Hi all,
I'm doing some copying from the backbuffer to a texture but am a little stumped by something.
When I copy a 16x16 section using:
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, DestX, DestY, SourceX = 10 ,SourceY = 10,16, 16)
It copies a section at the bottom of the screen and does so upside down.
I can offset it like so:
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, DestX, DestY, SourceX = 10 ,SourceY = GFX_HEIGHT - 10,16, 16)
And it copies the correct section. But it's still upside down. It seems to be using the Bottom Left as the origin, even though the glOrtho2D is set up to use the top left. Is this behaviour set? How do you get around this without having to flip the onscreen image as well?
I'm doing some copying from the backbuffer to a texture but am a little stumped by something.
When I copy a 16x16 section using:
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, DestX, DestY, SourceX = 10 ,SourceY = 10,16, 16)
It copies a section at the bottom of the screen and does so upside down.
I can offset it like so:
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, DestX, DestY, SourceX = 10 ,SourceY = GFX_HEIGHT - 10,16, 16)
And it copies the correct section. But it's still upside down. It seems to be using the Bottom Left as the origin, even though the glOrtho2D is set up to use the top left. Is this behaviour set? How do you get around this without having to flip the onscreen image as well?