PDA

View Full Version : invalid enumerant



bismuti@boeing
05-25-2005, 10:43 AM
I'm getting this error message when I turn lighting on. I'm having trouble finding what the cause is of the error message. It doesn't seem to effect the performance of my code, but I'd like to fix it anyhow. Any clues as to what may be causing this?

Thanks

powerpad
05-25-2005, 10:58 AM
try to track the exact position when the error pops up the first time -> check after each relevant call with glGetError and than look into the manual what is said about errors on glEnable(GL_LIGHTING) ...
or post some code

jide
05-26-2005, 01:39 AM
Do you use any hard values like (0x1234) instead of gl enums (like GL_LIGHT0 for example) ? If so, try not to do so.

Hope that helps.

05-26-2005, 01:59 AM
Originally posted by bismuti@boeing:
I'm getting this error message when I turn lighting on. I'm having trouble finding what the cause is of the error message. It doesn't seem to effect the performance of my code, but I'd like to fix it anyhow. Any clues as to what may be causing this?

ThanksThe problem with the GL constants is that they are not typesafe and can be (ab)used in many ways, for example one could write:


glEnable(GL_RGB);This will compile just fine, but of course is completly bogus and will result in a invalid enumerant error at runtime.

GLIntercept should be able to pinpoint that error.
Try it at http://glintercept.nutty.org/