🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
OpenGL applications using too much CPU
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
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
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
Popular Topics
Advertisement