Original Post
I have an SDL application displaying OpenGL graphics. It runs very smoothly until my mouse moves over the screen. Then I get drastic jumps in frame times causing a headache inducing jitter of the whole screen. It's subtle, but noticeable and quite unacceptable. Frame times when mouse is stationary: 0.017 0.017 0.017 ...and when mouse is moving: 0 0.032 0 0.032 0 The problem happens ONLY when the mouse is MOVING and ONLY when over the screen. Moving the mouse off the window does not cause the problem. Leaving the mouse stationary hovering over the SDL window does not cause the problem. I thought maybe my mouse movement callback function was slowing things down, so I disabled it. I disabled event handling for mouse movement altogether and the problem remains. I also tried turning off the cursor with SDL_ShowCursor(0) thinking that perhaps drawing the cursor over the OpenGL viewport was causing the problem... but that didn't help. Interestingly, the problem is not visible on my laptop. Just my desktop PC. Any help would be greatly appreciated. EDIT: I have found and tested this the solution proposed in this forum. Amazingly, the mouse jitter issue has completely disappeared now: http://www.gamedev.net/community/forums/topic.asp?whichpage=1&pagesize=25&topic_id=496012
Quote:[Edited by - kiaran on October 14, 2009 12:02:38 PM]
Original post by bobmitch SOLVED!!! It's a quirk of nvidia's slightly experimental drivers I think. After puzzling over my code and how opengl works, I narrowed it down to either an SDL bug or a driver bug. The more I fiddled with various delays in my main loop, the more it seemed like a threading issue... but my code is running in a single thread right now. Solution: Disable threaded optimization in the advanced settings in the Nvidia control panel, it looks like it's set to Auto by default.