PDA

View Full Version : glTexSubImage2D



Spahrep
06-08-2001, 10:35 AM
I'm not to familiar w/ this function.
I was wondering if anyone could give me a hand.
Im using the TK libs. here is sudo code for what i have so far. i want to take one of
these textures and cut it up and store it as
smaller textures.

TK_RGBImageRec *images[2];
images[0] = tkRGBImageLoad("BIGMAP.sgi"); glPixelStorei();
glTexImage2D();
glGenTextures(2, &texture[0]);glBindTexture(GL_TEXTURE_2D, texture[x]);
glTexImage2D();
glTexParameteri();
Then when i go to bind the texture i just use:
glBindTexture(GL_TEXTURE_2D, TMap[0]);
before i start drawing.

The problem is my computer doens't like to
do loadimages more than 8 times or so.
So breaking up lareger images into smaller
textures would be ideal.

MButchers
06-09-2001, 12:24 AM
Hello there,

glTexSubImage2d(..) is used to modify
a given rectangle of texels in the currently
bound texture.