Skip to main content
gamedev.net
🔒 Locked

Checking texture existence

Started by vivekd Jul 13, 2006 at 3:38 AM 2 replies 850+ views
Original Post
vivekd
vivekd
If I use a texture, i.e. an unsigned integer (uint) to apply it to a polygon using glBindTexture(uint), can I know whether the texture pointed by uint exists in memory? Is there any method to check texture existence?
Brother Bob
Brother Bob
Quote:
Original post by Anonymous Poster
use glGetError > http://www.mevis.de/opengl/glGetError.html
beware, if you have others errors befors, better call
glGetError()// reset flags and ignore eventual previous errors
glBindTexture(...)
int err = glGetError()// real check

Calling glBindTexture with an unused texture ID is how you create new texture objects and is certainly not an error.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.