View Full Version : texture creation exception handling

02-19-2002, 06:13 AM
When you create a texture, using (glGenTextures) and glTexImage2D, how do you know if the texture was really created. Is there a way of checking like: if(!(byte = malloc(1))){.......}. When memory is low this can happen.

02-19-2002, 07:43 AM
I assume you'd get GL_OUT_OF_MEMORY back from glGetError() when your memory is low..

02-21-2002, 03:45 AM
This way it's possible not only to check out of memory errors but ALL errors, the rest it's up to you (wrong pointers, data formats, data size and so on)..

rIO.sK http://www.spinningkids.org/rio