PDA

View Full Version : weird problem with SwapBuffers() and mouse cursor



miko
07-06-2003, 04:46 AM
people listen, i'm in a serious trouble, my customer will kill me! my last chance is figure out this problem

i'm running winXP, Celeron1.7Ghz, ATI Rage 128 and when i call SwapBuffers() mouse cursor disapeares. on the next call it appears again and so on.... on other hardware configurations is everything cool but this ATI is strange.

so... instead of one call to SwapBuffers i call it twice and you can imagine what happened to performace!

07-06-2003, 09:03 AM
Originally posted by miko:
people listen, i'm in a serious trouble, my customer will kill me! my last chance is figure out this problem

i'm running winXP, Celeron1.7Ghz, ATI Rage 128 and when i call SwapBuffers() mouse cursor disapeares. on the next call it appears again and so on.... on other hardware configurations is everything cool but this ATI is strange.

so... instead of one call to SwapBuffers i call it twice and you can imagine what happened to performace!

Do you have your PIXELFORMATDESCRIPTOR's dwFlags entry OR'ed w/ PFD_DOUBLEBUFFER?

miko
07-06-2003, 01:41 PM
Originally posted by benadam777:
Do you have your PIXELFORMATDESCRIPTOR's dwFlags entry OR'ed w/ PFD_DOUBLEBUFFER?

yes

Relic
07-07-2003, 04:46 AM
If the mousecursor is not drawn with full hardware acceleration it has to be taken off the screen when OpenGL does a SwapBbuffers and put back on screen again after the swap has finished.
Mouse cursors on older hardware might not run with hardware when they do not support the fancy Windows XP colors, size, or shadow stuff.
Try to disable all sorts of WinXP shiny mouse effects, use a standard black and white mouse cursor with no shadows and see if it helps.
If not, try updating the driver.
If it's still broken, try to call ShowCursor(TRUE) after the swap.

07-07-2003, 06:21 AM
If you have to call ShowCursor do you also need to call glFinish so that the mouse is displayed after the swap has finished. Placing a glFinish right after the call to SwapBuffers is crazy if performance is important. The best place is before you starts to send data to the card.

A brainstorming idea is to call glFinish without any call to ShowCursor. Since you get the cursor sometimes do I suspect that the driver bug has something to do with if the buffers are full.