Sign in to follow this  
Solance

glCopyTexSubImage2D

Recommended Posts

Quote:
Original post in another topic about the same thing by Solance
*cough* it fits in the category of General Programming too *cough*


Really, you're asking a question about specifics of the OpenGL API. As a result, you're going to get better results by posting In the OpenGL forum, rather than just repeating yourself here. Seriously. There's no point to the OpenGL forum if everyone posts their OpenGL questions here, eh? Don't worry, I'll report it for moving...

Going by Enigma's post in that thread:
Quote:
Original post by Enigma
If I understand you right I think you probably want a combination of GL_EXT_framebuffer_object and glCopyTexSubImage2D. Basically, bind your source texture as the read buffer and then glCopyTexSubImage2D to your destination texture.

I'm not saying there isn't an easier or more efficient way, but that's the best I could come up with at short notice.

Enigma


I'd assume one would do something like:

glBindTexture( GL_TEXTURE_2D , source_texture );
glcopyTexSubImage2D( target_texture , 0 , 0 , 0 , 0 , 0 , 16 , 16 );


You could allways try:
[google] Search: glCopyTexSubImage2D example
Which does list some examples which use it.

Try experimenting. It'll be good for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this