Advertisement

OpenGL applications using too much CPU

Started by September 01, 2006 04:03 PM
2 comments, last by Palidine 18 years, 2 months ago
Hi! My ogl applications using too much CPU. Probably it's caused use of 'while' loop in main function. How could I substitute it? ZQ
erm... so what you actually want to do instead of guessing, is to get a profiling program (like VTune). It will tell you specifically what part of your program is slowing things down. Guessing that it has to do with a "while" loop is unlikely to get you anywhere.

When optimizing:

1) consider algorithmic changes: i.e. try to reduce O(n^2) to O(n), etc.
2) re-consider algorithmic changes
3) re-profile and find functions that are hotspots: optimize them

-me
Advertisement
At the end of your while, use Sleep.
Quote: Original post by SirKnight
At the end of your while, use Sleep.


ah. i mis-understood the question. =)

-me

This topic is closed to new replies.

Advertisement