Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Reasons for glPopAttrib causing indirect errors

  1. #1
    Intern Contributor
    Join Date
    Aug 2009
    Posts
    73

    Unhappy Reasons for glPopAttrib causing indirect errors

    Hi everyone,

    I have a glPopAttrib causing a GL_INVALID_OPERATION. According to the man pages glPopAttrib may cause a GL_INVALID_OPERATION if it is executed between glBegin and glEnd.
    However, this ist not the case and i remember vaguely that i had a case once where the internal state could not be restored - i think it had s.th. to do with the impossibility to restore a glReadBuffer pointing to a FBO color attachment point, because the bound framebuffer changed in the meantime (between push and pop).

    (1) Are there any other known cases where popAttrib might fail with GL_INVALID_OPERATION? (i make heavy use of shaders, VBO, FBO)

    (2) Are there any more possibilities to debug this except glGetError and comparing state before /after push and pop?

    Thanks for your help...

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,097
    glGetError is the only (and very poor) method of detecting errors unless you have an AMD card; although the new 4.3 drivers are promising more.
    Your error need not be from the glPopAttrib - put a call to glGetError before glPopAttrib to confirm this.
    Also make sure your glPushAttrib/glPopAttrib match.

  3. #3
    Intern Contributor
    Join Date
    Aug 2009
    Posts
    73
    I already did, it is from glPopAttrib

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •