![]() |
|
glutWarpPointer lag and fps movement - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Game Programming Fundamentals (/forum-7.html) +--- Thread: glutWarpPointer lag and fps movement (/thread-8561.html) |
glutWarpPointer lag and fps movement - Ropeburn - Jan 18, 2011 06:40 PM I have a windows/mac game based on glut and have noticed that the glutWarpPointer function on the mac introduces alot of lag. Makes the game unplayable. From what I've read, it is a known problem. I replaced glutWarpPointer with my own code wrapped around CGDisplayMoveCursorToPoint, but it doesn't perform any better. How can I warp the cursor to the center of the screen without the lag? How are people writing fps games for the Mac? RE: glutWarpPointer lag and fps movement - OneSadCookie - Jan 18, 2011 06:56 PM You need to call CGSetLocalEventsSuppressionInterval to turn off the delay (which will fix glutWarpPointer too), but you shouldn't be using GLUT at all
RE: glutWarpPointer lag and fps movement - Ropeburn - Jan 18, 2011 09:02 PM Thanks OneSadCookie, I'll give that a try tommorrow and post afterwards. So, if I am not to use GLUT, and I was to stay crossplatform, what would you recommend? It is a valid apple supported framework, isn't it? T. RE: glutWarpPointer lag and fps movement - OneSadCookie - Jan 18, 2011 09:47 PM It's not really intended for shipping a game. For one thing, it has that awful settings window that you can't get rid of. The keyboard input routines leave much to be desired, and the full-screen management is pretty awful, too. SDL is a possibility if you really want cross-platform. It's not a perfect Mac citizen, but there's plenty of commercial games using it. It also exists for iOS, which GLUT doesn't as far as I know. If you're willing to learn a little, you can roll your own shell for each platform you care about. It's not much code per platform, and you can be a better citizen on each than something like SDL allows. |