CPU Load High
I'm using Win32 API. And when I run the application, the CPU load is loud. And I was wondering how do I get it not be so loud. Heres the loop. Oh its not loud when it's visible, but when you minimize it or put it behind another window that covers it, its loud.
while(msg.message != WM_QUIT)
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
// check the 'escape' key
//PostMessage(hWnd, WM_DESTROY, 0, 0);
// clean up DirectX and COM
August 16th, 2007, 05:35 PM
Sorry, I'm not familiar with Win32API but...
... I think you're rendering too many frames ... okey I will cut the jokes.
Basicly you have the inner while loop without any 'sleeping', if you stop rendering the scene when the window is minimized, it will cycle like a fury - causing the processor to heat up.
If I'm mistaken due to my lack of knowledge, I'm sorry...