#100 glFogCoordfEXT () within glBegin - GLerror invalid operation

v2.0.1
open
GL (74)
6
2004-02-03
2004-02-03
Brian Leair
No

I'm experiencing a GLerror "invalid operation"
exception when I try to used glFogCoordfEXT () within a
glBegin ()/glEnd () set.

I'm about to delve into the interface C code to see why
s as to what is triggering the exception. I have
observed the following:
#1 calling glFogCoordfEXT () outside of glBegin ()
works as expected.
#2 catching the exception and ignoring it (basically
ignoring it) results in a program that works - I get
the fog effect that I expect.

I don't think I have a stupid user error. I've checked
that glEnable (), glHint (), and glFogx () calls are
appropriate. Plus my program works with code in place
to catch and ignore the exception

I see in the documentation that "invalid operation"
will be thrown if you try to use an extension without
having called the appropriate extension init function,
but I have that.

If this is a stupid user error, I apologize heartily.

I do see in the Error section for the C documentation
of glGetError (), that calling glGetError () during a
glBegin()/glEnd () pair will also generate
GL_INVALID_OPERATION. Could this be related?

Discussion

  • Logged In: YES
    user_id=34901

    The problem is that the extension module should have used
    the Python EXCEPTION_HANDLER macro instead of the
    GL_EXCEPTION_HANDLER macro. More precisely, should move
    those functions which can be called from within
    glBegin/glEnd to an area which has EXCEPTION_HANDLER, rather
    than GL_EXCEPTION_HANDLER. There do appear to be functions
    which shouldn't be called from within glBegin/glEnd.

     
    • priority: 5 --> 6
    • assigned_to: nobody --> mcfletch