Jump to content
  • Advertisement
Sign in to follow this  
WithoutRemorse

Glut window code a memory hog?

This topic is 5025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I found something rather interesting running my program on several different computers. It slowed down a lot on some of them (2 Ghz or less). I checked the task manager and it took 98% (!) of the CPU! It also took up 98% fullscreen mode on a 2.26 Ghz machine, 5-15% windowed. To contrast this I looked at NeHe's tutorial 19's CPU useage... about 3-5% on the same 2.26 Ghz machine. Granted, there are probably settings I don't know about that could account for the difference in my program on computers with only slightly different hardware, but that doesn't account for the significantly poorer performance versus the NeHe code. The only significant program difference I could think of to cause this is that I'm using the glut window code while the NeHe program builds up its own Windows 32-bit window. Does the window code really matter that much? And what exactly accounts for this difference between the code, the glutmainloop or what?

Share this post


Link to post
Share on other sites
Advertisement
A windows program will take up as much of the CPU as possible if you let it. The Win32 function sleep() will tell windows to let other processes run while your program takes a break for a given period of time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!