Sign in to follow this  

Texture object reloads

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

This topic is 4479 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.

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