Can't get glTexSubImage2D to update texture

I’ve searched the forums for an answer to this but with no success. All I’m trying to is update a subregion of an existing texture (that I loaded earlier in the program) with a smaller texture, that too was loaded earlier. Here is the code


Texture subTexture = getTexture(small_Image.name);
gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 1, 100, 100, 128, 128, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, subTexture.getPixels());

when I run this portion of the code, the original portion of the texture remains unchanged…

???

Are you using mipmapping?

nO, no mipmapping. I set the level to ‘1’. However, I wonder if the fact that my image is in RGB format (with no alpha) hence 3 bytes per pixel, if that is the reason for the problems I am experiencing.

Try setting the level to 0.

That did it! doh! If I had known this, then perhaps I would have more hair! hehe