PDA

View Full Version : How to boot up the performance?



kstsui
04-20-2003, 12:11 AM
I have written an application modeling my campus, the size of the code is quite large so that the program is quite slow...

And it seems that the OpenGL program cannot make use of the graphics card that much, and the system is 100% utilised for my application...

How to make my program, say, run in a higher priority, like some PC games, u can enter a full screen mode and take up more resources from the system?

Thx all for the generous help!!!

jwatte
04-20-2003, 06:59 AM
You don't seem to have paid attention during OS class. Running at a higher priority does NOT typically increase throughput (frame rate); it only decreases latency in the case where you're not 100% CPU bound.

You should use a profiler to find out where your program is spending its time, and figure out how to make it not do that. I recommend VTune because it's so easy to just start up, sample, and then get a view of where the time is spent.

Make sure you profile the release build of your program, not a debug build.

kstsui
04-20-2003, 07:48 AM
Thx for the advice~

But after the check, what can I do to improve the performace of the program? not by mean of refining the code of OpenGL, but making a better use of the hardware?

HS
04-20-2003, 09:50 AM
Since you said "the code is quite large" I assume you send all the geometry to the card each frame?

If that is the case you should look into "frustrum culling" and send only those objects that are either full or partial inside the volume.

roffe
04-20-2003, 10:03 AM
kstsui,

if you are unfamiliar with concept of graphics pipeline tuning, I suggest you find some resources on it. Real-time Rendering(2:nd Ed.) by Möller and Haines has a good chapter on it. NVIDIA might also have some papers.

kstsui
04-20-2003, 10:10 AM
yup, I made use of this technique already.

What else can I do?

thanks

HS
04-20-2003, 10:27 AM
I guess its easier when you explain what you have done so far.

hanner
06-30-2003, 07:50 AM
tweak your code with assembler

rgpc
06-30-2003, 09:34 PM
Originally posted by kstsui:
Thx for the advice~

But after the check, what can I do to improve the performace of the program? not by mean of refining the code of OpenGL, but making a better use of the hardware?


You could start by telling us how you draw your geometry (Immediate Mode, Display Lists, CVA's, VAR/VAO/VBO?). And the size of your geometry (# of Tris/Verts). Plus what your graphics card is, and if you've checked to see if the card is running HW T&L or if it's fallen back to Software?