PDA

View Full Version : Mouse flicker



Furrage
01-09-2001, 08:05 AM
I creates an OpenGL window but when I move the mouse over it I get an annoying flicker. Is there any way to get rid of this?

The window is done in MS VC++ 6 by creating a win32 app then linking in MFC (See tutorial at http://devcentral.iftech.com/learning/tutorials/mfc-win32/opengl/). I have expanded on the code and am using it as a child window. Its double buffered and refreshed continuously (hence I suspect the flicker).

I tried using SetCursor to hide the mouse and draw it myself with opengl. However, I can't get a fast enough refresh rate to make the mouse respond smoothly.

Does anyone have any solutions?

mango
01-09-2001, 12:07 PM
I think it is much better to let windows handle the mouse drawing. Do you get flicker even then?

Furrage
01-09-2001, 06:52 PM
I get the flicker when windows draws the mouse. When I draw the mouse I don't get any flicker, but the frame rate is so slow it hampers mouse responsiveness.

RobertSI
01-10-2001, 02:29 AM
If you go to Settings-ControlPanel-MouseProperties-Pointers and uncheck Enable pointer shadow this will fix that problem.

Furrage
01-10-2001, 09:07 AM
I just realised that the mouse flicker only happens when the mouse is in a child window which uses OpenGl and double buffering (my other test programs don't cause the mouse to flicker). So guessing that this was the cause I set the child window to capture the mouse. This stops the flicker, but now the main window won't respond. Any suggestions how to get around this problem?

Note: I called the SetCapture command from the child window's OnSetCursor message handler. I also tried doing the same thing from the parent's OnSetCursor command but it still doesn't respond. I'm new to using windows messages so I suspect I am not using the correct ones to shift capture from the parent window to child window and back.

PS: The program is designed for Win95 and Win98 clients. Win95 does not have the remove shadow option in mouse properties.

Starnut coder
01-18-2001, 03:21 AM
My suggestion to mouse use is learn DirectInput. Its not hard and its great.
It wont flicker and has smooth input and extra functions