Advertisement

Fill rate problem

Started by January 10, 2002 04:20 PM
13 comments, last by Eber Kain 23 years, 1 month ago
Hello there,

Also check your clear statement ( if you have one )

if its

glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);

then you only need

glClear(GL_DEPTH_BUFFER_BIT);

as you are clearing the color buffer when you output the quad(s).

Also ensure youve disabled all non essential glStates ie
blending,lighing.

use flat shading.

glShadeModel(GL_SMOOTH);

Disable any depth testing and depth buffer write''s.

glDisable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);

Make sure the texture environment mode is set to GL_DECAL.

glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_DECAL);

Switch off texture filtering on the BG textures.

Make sure you only use a GL_RGB texture to minimize texture size.

If your card supports it look at texture compression as well.



Hope it helps

Mark


start your renderer like this

- clear DEPTH_BIT //glClear(GL_DEPTH_BUFFER_BIT);
//do not clean the color bit if you always
//draw your background
- turn to flat shading //glShadeModel(GL_FLAT);
- disable depth test //glDisable(GL_DEPTH_TEST);
- draw the box
- render the rest

Oztan.
Advertisement
oops, butchers already said those 7 minutes ago...
quote:
use flat shading.
glShadeModel(GL_SMOOTH);

Nice one, Mark

Also, there''s no need to disable depth writing with :
glDepthMask(GL_FALSE);
since disabling depth testing both diable depth reading and depth writing, with :
glDisable(GL_DEPTH_TEST);
Doh

This topic is closed to new replies.

Advertisement