Interface
06-13-2004, 12:13 PM
I ran into some performance troubels. To picture what i'm doing: loading in 2 md2 models, put them on the screen (one next to the other), i have texturing and 2 lights (one red one green) shining on them.
I use vertex/normal/textcoord arrays and drawelements() to render.
my render loop looks like:
glMatrixMode(GL_MODELVIEW);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1.0f,1.0f,1.0f);
glLoadIdentity();
gluLookAt(X,Y,Z, viewX,viewY,viewZ, viewUpX,viewUpY,viewUpZ);
then loop the models, in this case 2 times:
glPushMatrix();
translate+drawmodel
glPopMatrix();
i tried taking out the matrixmode call, and the loadidentity and glulookat by doing it all in the beginnen and then pushing the matrix, but it has little or no effect.
on the radeon9800 it runs @ 1500+ fps, but on a geforce2 it only has 25fps!!
when i drag the window below the screen, so only the window title bar is visible, the fps rises upto 205fps... does that mean it's just the rendering going slow and my main loop coding is good?
any thoughts? (i'm using c++)
I use vertex/normal/textcoord arrays and drawelements() to render.
my render loop looks like:
glMatrixMode(GL_MODELVIEW);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1.0f,1.0f,1.0f);
glLoadIdentity();
gluLookAt(X,Y,Z, viewX,viewY,viewZ, viewUpX,viewUpY,viewUpZ);
then loop the models, in this case 2 times:
glPushMatrix();
translate+drawmodel
glPopMatrix();
i tried taking out the matrixmode call, and the loadidentity and glulookat by doing it all in the beginnen and then pushing the matrix, but it has little or no effect.
on the radeon9800 it runs @ 1500+ fps, but on a geforce2 it only has 25fps!!
when i drag the window below the screen, so only the window title bar is visible, the fps rises upto 205fps... does that mean it's just the rendering going slow and my main loop coding is good?
any thoughts? (i'm using c++)