Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

HyprLogik

glBindTexture()

This topic is 6511 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 know that since you can''t bind a texture that is currently in use, an error pops up if you try. How do I see if a certain texture is being used at the moment? Thanx. |-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!

Share this post


Link to post
Share on other sites
Advertisement
the only way I know of is storing the texture id yourself
ie

  

GLuint BoundTexture;

void __fastcall TextureLibClass::BindTexture(int Index)
{
if(glTextureIDs[Index] != BoundTexture){
glBindTexture(GL_TEXTURE_2D,glTextureIDs[Index];
BoundTexture = glTextureIDs[Index];
}
}



hope this helps.

Share this post


Link to post
Share on other sites
i dont understand u can bind a texture more than once yes its redundant but u shouldnt get an error

ie theres nothing wrong with the following
glBindTexture(GL_TEXTURE_2D,texture)
draw someit
glBindTexture(GL_TEXTURE_2D,texture)
draw someit

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites

  • 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!