poor performance

Hi, I’m new to openGL but managed to get a barebones program up and running. All it does is draw a square and rotate it.

Everything seems to work fine until my mouse enters the window area, at which point I suffer a pretty bad performance hit. The square visibly slows in its rotation until the mouse again leaves the window area.

I have sibling and child clipping enabled (only thing I could think of). Since i copied most of the window and pixel format code from a tutorial (nehe’s) and code which does not suffer this problem when run, I’m not sure what I’m doing wrong! I can post up code if need be. Any suggestions appreciated.

Under Windows 2000, and maybe XP aswell but I’m not sure, I think there can be some problem with the shadow under the mouse cursor. If you have this shadow, try disable it and see if it helps. You can disable it in the mouse properties in the control panel.

Yes, I was running XP with mouse shadows, good call! Works great now, thank you!

Seems odd that I saw the performance hit in 1 version of the code and not the other, though…which suggests there is a less user-invasive way around the problem (aside from throttling Microsoft and getting Linux .

Anyone have any idea what that might be? Just curious.

Being a bit of a conspiracy theorist, I can almost be certain that this effect can’t be seen with DirectX

I don’t know what causes this, but it may be related to the pixel format you use in your OpenGL window. If you have the problem in some programs only, maybe there’s something special with the pixel format used by these programs.

Can be a driver issue also, have you tried update your drives?

grin Robbo I hear ya!

I have an old voodoo 3 with fairly recent 3rd party drivers. That could be the problem but the pixel format and window handling code are identical in both programs (the tutorial and my custom program derived from it). I notice the hit isn’t as bad once i start making 3d objects and since the tutorial I tested it on has 2 3d objects with a bit slower rotation then mine, maybe the performance hit is still there but just not noticeable.

Who needs mouse shadows anyway? My desktop is gloomy enough as it is, no need for further overcast

Or you could hide the cursor, you probably won’t be needing it. I think it goes like this, but not sure:

ShowCursor(hWnd, FALSE);

hWnd is the handle to your window.