Original Post
I've been playing about with OpenGL for a while now, but have never bothered to use anything other than immediate mode until now. I constructed the quick test code below to test the performance of immediate mode, but found that drawing 1000 textured quads to the screen yields a framerate of only ~30fps according to fraps.
What is going on? I remember reading on here once that Quake 2 use immediate mode and rendered something like 10000 triangles per frame!
My computer is a couple of years old but has an i5 and a 4890. Why isn't my code below running at a higher frame rate?
Many thanks
What is going on? I remember reading on here once that Quake 2 use immediate mode and rendered something like 10000 triangles per frame!
My computer is a couple of years old but has an i5 and a 4890. Why isn't my code below running at a higher frame rate?
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glBegin(GL_QUADS);
for(int i=0; i<1000; i++)
{
glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex2f(screenWidth, 0.0f);
glTexCoord2f(1.0f, 1.0f); glVertex2f(screenWidth, screenHeight);
glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f, screenHeight);
}
glEnd();
glFlush();
}
Many thanks