Ever since I started using OpenGL inside my program, I started getting a ton of WM_PAINT messages. Is there a way to limit the amount of paint messages that are sent to my application? Im trying to limit the amount of CPU cycles that my application takes up and currently, its eating up a nice chunk.
In about 5 seconds, my program recieved about 100,000 paint messages.
Before it was only a few hundred.
For the purpose of this project, I need to have the openGL render calls inside the message loop in the WM_PAINT portion. Im NOT going for the best fps here, only selective rendering.
Here is my Main Loop code:
And then the WndProc picks up any messages.Code:while (GetMessage(&uMsg, NULL, 0, 0)) { TranslateMessage(&uMsg); DispatchMessage(&uMsg); }