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: Poor glClear performance for pbuffer

  1. #1
    Intern Newbie
    Join Date
    Oct 2003
    Posts
    30

    Poor glClear performance for pbuffer

    Hello !

    I am doing some tests for using pbuffers in
    some project of mine and I have discovered I have a problem:

    a glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) has a serious impact on
    performance when using pbuffers (on my GeForce FX 5200). On another system having a GeForce2 MX 400 the performance is better.

    If I replace the glClear with the following code:

    glDisable(GL_DEPTH_TEST);
    glColor3f(0, 0, 0);

    GLfloat z = -2;

    glBegin(GL_QUADS);

    glVertex3f(-10, -10, z);
    glVertex3f(-10, 10, z);
    glVertex3f(10, 10, z);
    glVertex3f(10, -10, z);


    glEnable(GL_DEPTH_TEST);

    (but I think a glDepthFunc(GL_ALWAYS) should do) the performance is good. The quad is enough to fill the entire pbuffer.

    Do you know what's happening ?

    Thanks

  2. #2
    Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    366

    Re: Poor glClear performance for pbuffer

    Leaving out a glEnd() in the code above is a typo or an actual mistake?

  3. #3
    Intern Newbie
    Join Date
    Oct 2003
    Posts
    30

    Re: Poor glClear performance for pbuffer

    That was a typo

Posting Permissions

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