Advertisement

OGL Engine Performance Problems

Started by January 23, 2003 12:51 PM
2 comments, last by orbano 22 years, 1 month ago
Hi there! Me and my friend are working on an OGL engine for an RTS game. We have learnt everything from the nehe tutorials, but now we have doubts about that, our engine has a good performance. On my machine (1900+ XP, Radeon8500LELE 64MB) it displays about 1,9 million triangles per second. The scene is: A 20x20x20 array of boxes made of triangles (not using quads), with an 512x512 texture on each side (all the same), using mipmapping. Is this performace all right, or it can be improved somehow? Please help!
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
1.9 is ok is your only using the likes of glBegin/glEnd.

It depends a bit on fillrate too.

general ways to improve performance, in order of improvement:

vertex array object (or vertex array range for nvidia) extension.
hence using vertex arrays.
texture binds! (not a problem for you I guess)
keeping the cpu and gpu in sync. This means not doing things like calling glReadPixels.
Keeping your vertex data as static as possible. Copying to AGP memory in blocks of 32 or 64 bytes. Keeping vertex strides to 32bytes if possible (this doesn't effect radeons much at all, since they are well designed, but gives nvidia cards a pretty good boost).
optimizing for the vertex cache. (ditto above)
using mipmapping. Reduces texel stride for distant pixels. Hence improves memory access.
reducing front to back rendering if overdraw is a problem.
using triangle strips instead of lists (once again, doesn't effect radeons any where near as much as geforces)
reducing usage of lighting, etc, when not needed.

do all that and it should be possible on your system to be getting around the 15-20 million tris/sec mark. I can on my radeon 9000 pro, which isn't as fast as a 8500. (well, depends I suppose)


| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |

[edited by - RipTorn on January 23, 2003 4:26:16 PM]
Advertisement
State changes. They make on hell of a difference. Make sure you have a good state tree, or something similar. I personally use an ordered trie...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
thank you for your answers! But i have a few questions (accordin to my bad english i think)
what do these mean:
"Keeping vertex strides to 32bytes if possible"
(an example would be nice)
"vertex data as static as possible"
what do you mean under static?

and heres my current structure (just an essence), what do you think?
http://www.tar.hu/birodalmak/downloads/code.txt







"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin

This topic is closed to new replies.

Advertisement