Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

Texture object reloads

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

I am not sure on this, but if I setup like 10 texture objects and I later want to reload data into them can I just reload the new data into the same object names or do I have to delete those objects first and then reload the new data into the same names? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MARS_999
I am not sure on this, but if I setup like 10 texture objects and I later want to reload data into them can I just reload the new data into the same object names or do I have to delete those objects first and then reload the new data into the same names? Thanks
You can overwrite an existing texture if it is the currently bound texture. glTexImage* will create a new texture in it's place. If you just want to change the texture data and nothing else (internal format, texture dimensions, and border will remain unchanged) you can use glTexSubImage*. You can also use glTexSubImage* to change all the texture data or just a subregion of it.

For more info, read the OpenGL Spec.

Share this post


Link to post
Share on other sites
Yeah thats the issue I will not know due to the user will select the texture that they want to use. So looks like I made the right decision in deleteing the object and just reload it.

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!