View Full Version : poor performance
05-14-2002, 11:58 PM
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.
05-15-2002, 03:16 AM
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 http://www.opengl.org/discussion_boards/ubb/wink.gif.
Anyone have any idea what that might be? Just curious.
05-15-2002, 03:50 AM
Being a bit of a conspiracy theorist, I can almost be certain that this effect can't be seen with DirectX http://www.opengl.org/discussion_boards/ubb/wink.gif
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?
05-15-2002, 06:00 AM
*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 http://www.opengl.org/discussion_boards/ubb/wink.gif
05-15-2002, 12:40 PM
Or you could hide the cursor, you probably won't be needing it. I think it goes like this, but not sure:
hWnd is the handle to your window.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.