PDA

View Full Version : Optimization



instruo
04-30-2004, 02:58 PM
Howdy all,

I have a quick yet rather ambigious question (but don't worry, I'm not asking you to help me with an exact, specific problem ;) ) Here's my general problem:

I have an Athlon 3000+, 1024 of PC3200 and a TI4600. The application I'm developing currently has a textured sphere of a couple thousand tris using a single, 2048 x 1024 texture of Earth ( Blue Marble is win (http://earthobservatory.nasa.gov/Newsroom/BlueMarble/) ). My sphere does some spinning, but that's pretty much the extent of his liveliness.

Now, doing all this fun stuff in display lists, I'm getting a mighty 78 fps (without DLs it was around 50). This seems mighty slow to me, so I figured I'd ask all of you out there for some general opengl optimization rules, without having to make you suffer through reading a bunch of my code.

I know a little bit about VBOs, but haven't gotten to the point of implimenting them yet. Seems like I've probably got something more fundamentally wrong than just the raw vertex pushing power, though, so I figured I'd ask you gurus for some basic suggestions :)

Also, one other little question. Does anyone know of a profiler specifically for OpenGL (on windows). I found a bunch of stuff about OpenGL Profiler for Mac, but nothing for Windows. Anyway, thanks for any advice!

harsman
05-03-2004, 09:12 AM
* Use mip mapping for the earth texture
* Use a compressed texture
* Read the presentation on performance from GDC 2004 byt ATI and Nvidia (available at their developer sites).

Aeluned
05-03-2004, 09:32 AM
Display lists often can improve performance by caching repetitively used commands (althoug I'm as skeptical as you about a performance gain of 28fps).
Thanks for trying to spare us a code review, but it sounds like your render function shouldn't be all that complicated and in this case could help diagnose the problem.

as far as VBOs or VARS (simple vertex arrays)- use them. You will obtain massive performance gains if you do. A couple thousand (i.e. 2,000) tris means 6,000 vertices for your globe; certainly enough to warrant the use of VARS or VBOs.

waramp
05-03-2004, 09:39 AM
A quick question: You aren't building a display list every frame are you?

Also: You are only binding the Earth texture once, before you begin drawing, right?