PDA

View Full Version : Mouse move and CPU usage



Bombata
03-20-2009, 07:11 PM
Hi guys,

I have noticed a strange behavior when running my OpenGL apps on windows XP. When I move the mouse over the OpenGL window, the CPU climb to ~25%. At first sight, it seems like the HW cursor is disabled and the OGL ICD is refreshing the window when I moved the mouse(only for my OGL window ??).

I don't have this problem with my software compiled on Linux (with glx instead of wgl...) or with a similar Direct3D 9 application. I have an NVIDIA GeForce 8600 with the 182.08 driver installed.

This is not a major problem, but this behavior is still a little annoying. Do you guys know a workaround for that ?

Thanks

yooyo
03-21-2009, 07:33 AM
Maybe your app catch WM_MOUSEMOVE events and then issue scene repaint? I never notice such behaviour on my machine.

Also.. open Display properties -> Settings -> Advanced -> Troubleshoot tab and move hardware acceleration slider to Full.

Bombata
03-21-2009, 02:37 PM
Thanks yooyo, the WM_MOUSEMOVE message is in my WndProc and I've tried to comment out the code with no effect on cpu usage :(

My HW acceleration slider is also set to FULL. Maybe I should try to run with a profiler to see if it can point the source of those computations.

Do you guys also have this behavior, no needs to have a complex scene. I've reproduced it with only a glClear(); glFlush(); SwapBuffers(hDC);. With the windows Task Manager open, when I move the mouse over my window, the CPU is climbing.