PDA

View Full Version : Poor glClear performance for pbuffer



fuxifuxi
10-20-2003, 05:06 PM
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

roffe
10-20-2003, 09:11 PM
Leaving out a glEnd() in the code above is a typo or an actual mistake?

fuxifuxi
10-21-2003, 01:11 AM
That was a typo