glutWarpPointer lag and fps movement
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?
How can I warp the cursor to the center of the screen without the lag? How are people writing fps games for the Mac?
You need to call CGSetLocalEventsSuppressionInterval to turn off the delay (which will fix glutWarpPointer too), but you shouldn't be using GLUT at all
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.
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.
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| glutwarppointer, what should i use instead? | m3the01 | 11 | 7,029 |
Mar 18, 2010 01:28 AM Last Post: Ingemar |
|
| AI/Movement | wonza | 6 | 3,485 |
Nov 26, 2008 10:23 AM Last Post: wonza |
|
| Slower Movement | Nick | 7 | 3,419 |
Aug 27, 2004 02:15 PM Last Post: Josh |
|

