What would cause glGenTextures to fail besides being inside a glBegin/glEnd block?
I’m using code from the NeHe tutorials but can’t get texturing to work. I believe the problem may have something to do with glGenTextures, because it returns zero as the “name” (as the redbook refers to it) of the texture and this apparently signals failure. I’ve gone so far as to remove all drawing from the program so there aren’t even any glBegin/glEnd blocks, but this doesn’t change the behavior of the function.
On a frustrating aside, I was going to use glGetError to attempt to plumb the nature of the problem right after the suspicious call. So I put a loop above the call to glGenTextures that loops while the error returned is not GL_NO_ERROR in an attempt to clear flags (as I’ve read you need to do), but this just loops indefinitely. Don’t know what I’m doing wrong there…
Any help is appreciated.