Advertisement Jump to content
Sign in to follow this  


This topic is 4976 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Could i get a good example of using glCopyTexSubImage2D? like a full example drawing to the screen and all so i can grasp how it works.

Share this post

Link to post
Share on other sites
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:
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.


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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!