Jump to content
  • Advertisement
Sign in to follow this  
LostinTime

Using Sub

This topic is 3895 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

hi, I seem to have a problem of subbing an image using glTexSubImage2D, cause I am running an avi video in my program. BUT, all my other textures also get replaced, and all of my quads now have parts of the movie stuck onto them. Is there any way to isolate the sub so that it sub the image only on one quad, but leave the rest alone?

Share this post


Link to post
Share on other sites
Advertisement
It replaces only the texture actually bound. What texture have you bound just before glTexSubImage2D?

Share this post


Link to post
Share on other sites
all my textures are binded to a specific quad, all using GL_TEXTURE_2D, before I called the subimage. Each of the other textures were binded and loaded before going into the main loop, so that the textures dont get reloaded and consume RAM.

Share this post


Link to post
Share on other sites
What Version of the GL are you using? Because texture objects were introduced fairly early, I think version 1.1 - they allow you to easiely exchange textures that are bound to one specific target like TEXTURE_2D. So you have to have two TEXTURE_2D textures, replace the data in the first, and just keep data in the second.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!