Skip to main content
gamedev.net
🔒 Locked

Texture ID Question...

Started by Vortez 1 reply 450+ views
Original Post
Vortez
Vortez
Hi, is it possible to check if a texture with an ID of 1 (or any other number than 0) have been generated, or, is free to use?
(The number returned by glGenTextures)

I think i've saw how to do this once but i can't remember how...
Brother Bob
Brother Bob
You can use the function glIsTexture to determine if a texture with an ID has been created (you have called glBindTexture on it), but there is no function to determine if it has only been allocated as a name (returned by glGenTexture). If this is a problem then you need to track the allocated IDs yourself.
Vortez
Vortez
Thanx, i think it was it.

Topic Locked

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

Sign in to reply to this topic.