A few thousand polys on screen, big slowdown!

Started by
4 comments, last by Just Chris 17 years, 5 months ago
[big edit] Doesn't make sense to make a new topic about my updated problem, so I'm restating it here. My initial topic was that TGA textures were slowing down my program. Just made a discovery. Loading textures doesn't seem to be the problem. Just displaying a few thousand untextured polys (<5000) is a chore on my system, Even when using a display list. I didn't have a routine to calculate fps on my program so this is just with my naked eye. 40 polys - >60fps and animates very well. 400 polys - framerate drop starts to become noticeable. Somewhere between 20 and 30fps at this point. 4000 polys - Big drop in framerate. Somewhere around ~2fps So is this unusual for a basic OpenGL program? [Edited by - Just Chris on November 7, 2006 2:30:44 PM]
Advertisement
Hi,

I cant remember the Nehe tutorial but from your description it seems that you load the texture (tga file) each time the loop iterates or sth like that. Am I right ? If so load the texture only once there is no point in loading it over and over. Once loaded and created texture (in OpenGL sense) is enough.

Actually, the textures are only loaded once and glBindTexture is just used to set the texture to the geometry on every main loop of the program. Nothing strange about that.

However, it seems that the textures aren't the problem at all. Now the topic title is misleading >_> I commented out the texture loading code and my program still runs sluggishly about 2fps with a few thousand quads on the screen. Is this unusual?

My vid card is a GeForce2 MX400. Nothing amazing, but I'm still stumped as to why this runs so slow when I can play UT2004 very fluidly at the same res as my program (800x600).
I think you should be getting a few more frames...can we see your rendering code?
the most likely result is due to fillrate (thus display lists VBO wont help)
simple to see if it is, resize the window to 320x240 does it run much faster?
if so then look into improving this
Fillrate has to do with it, since it does render quicker in low resolutions.

But I just figured out the problem...the matrix stack operations were inside the loop that renders the quads. After I removed them and replaced them with translate and rotate operations, it runs much smoother. The original code just wasn't written to move so many polys.

This topic is closed to new replies.

Advertisement