Jump to content
  • Advertisement
Sign in to follow this  
doesnotcompute

OpenGL Textures and sampler states

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

Since texture parameters are bound to a particular texture object in OpenGL, if you want to use the same texture in two places with different sampler settings (assuming pre-3.0 so no sampler objects) you have to create two different texture objects. Does anyone know if there's a way to at least let these two objects share the same underlying data or do you have to physically duplicate *all* data?

Share this post


Link to post
Share on other sites
Advertisement
no I think only with Opengl4 this is possible atm
u just have to create some data structures in your engine/renderer in which u can save texture parameters and then before using a texture enable all these saved parameters

Share this post


Link to post
Share on other sites
You need at least GL 3.3. Look up page 137 of the spec file. It is about Sampler Objects.

Share this post


Link to post
Share on other sites

no I think only with Opengl4 this is possible atm
u just have to create some data structures in your engine/renderer in which u can save texture parameters and then before using a texture enable all these saved parameters


Yeah that occurred to me. I just wonder what kind of overhead there is (if any) to constantly changing the texture parameters for a texture. If it's trivial (say, as much as for any other state change) this would work perfectly.

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!