Imagination PowerVR SDK Blog

glActiveTexture / glGet inconsistency?


In my application I use glGet w/ GL_MAX_TEXTURE_IMAGE_UNITS to query the number of available texture stages and then use that value to restrict the stages textures can be bound to.  Using the OpenGL ES 2.0 PC emulator (, this returns 32 on my system, which has a GeForce 8800 Ultra.  However, when I call glActiveTexture, I get the following error

In glActiveTexture error: 500 (GL_INVALID_ENUM) : texture number is out of range (min: GL_TEXTURE0), max: GL_TEXTURE0 + 7, given: GL_TEXTURE0 + 8

Is there an inconsistency in the value returned for GL_MAX_TEXTURE_IMAGE_UNITS and the error checking taking place in glActiveTexture?