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 10 of 10

Thread: glPushAttrib flicker

  1. #1
    Guest

    glPushAttrib flicker

    This is the strangest thing, but glPushAttrib() and glPopAttrib() causes my GL window
    to flicker all black when I try to select something. Commenting it out fixes the problem,
    but still why is this happening? I'm using an Intel 810E integrated graphics card,
    hardware enabled, attribute stack looks good, no GL errors.

  2. #2
    Guest

    Re: glPushAttrib flicker

    can you post a simple test case?

  3. #3
    Guest

    Re: glPushAttrib flicker

    glPushAttrib(GL_LIST_BIT); {
    glListBase( some_font_listbase );
    glCallLists( strlen("Testing"), GL_UNSIGNED_BYTE, "Testing" );
    } glPopAttrib();

    The above code cause the entire GL window to flicker black when selecting something
    on screen. Commenting out glPushAttrib(),glPopAttrib() stops the flicker.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: glPushAttrib flicker

    In fact I don't know what GL_LIST_BIT is intended for. It is not documented in my book. I guess you can freely omit it.

  5. #5
    Guest

    Re: glPushAttrib flicker

    It's for DisplayLists.

    It is recommended to push/pop the current display list so OpenGL returns to a neutral state
    when you're done with it.

    But I don't know why this is interfering with my picking routine. Elsewhere I use the OpenGL
    selection buffer for picking, and the RenderMode is properly restored back to glRenderMode(GL_RENDER);
    so I don't see the problem.

  6. #6
    Guest

    Re: glPushAttrib flicker

    Is your code running clean (without opengl errors)?

    Have you read the spec on these functions and have you satisfied the conditions for normal operation?

    Can you post more than a function call or 2? I meant a complete test case. It's hard to deduce much from a couple of function calls...

    Hlz

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: glPushAttrib flicker

    In his original post he says he's not getting any OpenGL errors.

    Could you post the relevant portion of code where you push and pop stuff and do your selection?

    My guess is that your pushing your render list, and then calling some empty list during your selection which would cause the screen to go black.
    Popping the list back you would then have your correct render list again.

    ...just a thought.

  8. #8
    Guest

    Re: glPushAttrib flicker

    Here is the important stuff from my selection routine:

    Code :
     glSelectBuffer( num_hits, hits );
     glRenderMode(GL_SELECT);
     
     // setup picking projection here
     
     glInitNames();
     glPushName(0);
     
     INT poly_id=1;
     
     for(INT i=0; i < num_polys; i++) {
     
        glLoadName(poly_id);
     
        glBegin(GL_POLYGON);
           // draw some stuff here
        glEnd();
     
        poly_id++;
     }
     
     glRenderMode(GL_RENDER);
     
     // restore projection here

  9. #9
    Guest

    Re: glPushAttrib flicker

    In his original post he says he's not getting any OpenGL errors.
    So he did, but I'm not convinced

    I'm still waiting to see a complete test case. A complete test case is the smallest compilable app that consistently reproduces the problem. You know, so others can run it on their systems to see if the same thing happens.

    If by chance this is a driver bug, you'll need a complete test case for the intel devrel team anyway. Nobody is gonna want to dig through a lot of code to find the problem. Keep it small and simple, but complete nonetheless. It's good programming practice to try and isolate problems like this in a reproducable way, if for no other reason than to convince yourself that it is or is not your mistake. This can save everyone lots of time in the long run...

    Anyways, good luck to you.

    Hlz

  10. #10
    Guest

    Re: glPushAttrib flicker

    Well, unless someone here has an Intel 810E integrated graphics card, I don't think you're going to see the problem. I did try the same program on another computer with newer and better graphics card, and did not see the problem.

Posting Permissions

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