weird problem with SwapBuffers() and mouse cursor

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!

Originally posted by miko:
[b]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![/b]

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

Originally posted by benadam777:
Do you have your PIXELFORMATDESCRIPTOR’s dwFlags entry OR’ed w/ PFD_DOUBLEBUFFER?

yes

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.

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.