roaming large images

I’m hopeful that there is a way to use opengl textures to get this to work. I’ve tried creating a 2k x 2k texture map (using glTexImage2D), using glTranslatef(), and when the leading image display pixel is an arbitrary tile’s width (say 256 pixels) from the right edge, using glCopyTexSubImage2D to move the pixel block that starts at 256 and goes to 2048 to 0 to 1768 and then using glCopyTexSubImage2D to load in new pixels in texture space from 1768 to 2048 (in image space from 2048 to 2304) .

I can’t get the initial glCopyTexSubImage2D to work. It copies black into the destination. I’ve tried messing with glDrawBuffer and glReadBuffer, and yes textures are enabled and bound. If it doesn’t copy all black, it produces what looks like a minified 32 x 32 image in a corner with the rest black. Help!!!

Are there any code examples on the web that would help me? Or better yet, can anyone give me some tips?

Thanks in advance,


You need to use glCopyTexImage2D(…) first, then use the sub flavor.