Sign in to follow this  

Glut window code a memory hog?

This topic is 4744 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
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

This topic is 4744 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this