IllegalStateException from glSecondaryColorPointer

Started by Orangy Tang, September 29, 2008, 20:22:28

Previous topic - Next topic

Orangy Tang

I'm getting an IllegalStateException ("Function is not supported") when I try and call GL14.glSecondaryColorPointer. This is on an Intel 915GM, which while admittedly not a particularly great chip, does report GL_VERSION as 1.4.0. Shouldn't this function be supported or am I doing something wrong?

spasi

Yes, glSecondaryColorPointer is 1.4 functionality and should be supported. Sounds like a bad driver case. Could you check if EXT_secondary_color is supported and if glSecondaryColorPointerEXT works in EXTSecondaryColor?

Anyway, to avoid such mishaps on a deployed application, don't depend on the string returned by GL_VERSION. It is more safe to check the OpenGLxx flags in ContextCapabilities. LWJGL checks every pointer on context init and, for example, will set OpenGL14 to false if glSecondaryColorPointer isn't exposed by the driver, even if GL_VERSION returned 1.4.