PDA

View Full Version : OpenGL Error:: Invalid Operation



Roach
06-13-2001, 11:53 AM
Ok guys, you helped me once - so please help me agian!
I am getting this error in my OpenGl program. This section of code draws a Line Strip given points which are updated on a one second
basis.
Everything compiles, and it doesn't core dump. I am seeing what looks like the start of a Line Strip - but's it's not long enough to be
correct (with the data I am feeding it).
So I checked my error logs and found "OpenGL Error:: invalid operation". So How do I handle the problem, what should I check to make
this thing happen? I can't fing too much help about OpenGL errors in the Red, Blue or Green books! If anyone can help that would be
great!!!

Thanks
Roach

mikael_aronsson
06-13-2001, 01:23 PM
Hi !

The most common reason for this is that you have put a statement that is invalid between glBegin/glEnd, that's the only time I have seen that error.

Mikael

Roach
06-13-2001, 01:25 PM
What would be an invalid statement???

Thanks
Roach

ffish
06-13-2001, 05:28 PM
You've got the blue book? Look up glBegin and the errors that can be generated by it. In short, don't call anything other than glVertex, glColor, glIndex, glNormal, glTexCoord, glEvalCoord, glEvalPoint, glArrayElement, glMaterial, glEdgeFlag, glCallList or glCallLists between glBegin and glEnd.