Dark Helmet
Newcomer
On a GeForce FX 5950 Ultra with a stock ortho projection, does anyone know why the performance of this loop which renders unoccluded polygons that fill the screen varies by 20% if you just swap the comments on which z values are used (-512, -511, ... -257 versus -64, -63.875, ... -32.125).
This is with a 24-bit depth buffer cleared to 1, depth range set to 0..1, and depth testing is on. I'm at a loss to explain this one.
Code:
glOrtho ( 0, HRES, 0, VRES, 0, 1000 ) ;
...
for ( i = 0 ; i < 256 ; i++ )
{
float z = -512 + i;
//float z = -64 + i / 8.0;
glTexCoord2f(0,0);glVertex3f ( 0 , 0 , z ) ;
glTexCoord2f(1,0);glVertex3f ( HRES, 0 , z ) ;
glTexCoord2f(1,1);glVertex3f ( HRES, VRES, z ) ;
glTexCoord2f(0,1);glVertex3f ( 0 , VRES, z ) ;
}
This is with a 24-bit depth buffer cleared to 1, depth range set to 0..1, and depth testing is on. I'm at a loss to explain this one.