On Fri, 14 Dec 2007, Chris McCormick wrote:
My dream of writing a quake style shooter in Gem (heh) has been foiled. Apparently neither Gem nor luagl support the glutWarpPointer call which many shooters use to restrict the mouse to the centre of the screen between reads of the mouse pointer movements (so the mouse can't move off the screen). That and the fact that the Gem window sometimes seems to not pick up key presses in full screen mode. Any chance we can add glutWarpPointer to Gem? Any other ideas?
I explained part of the full-screen key event problem on #dataflow a few days ago. It involves registering <Enter> and <Leave> events, and then handling them using XSetInputFocus, or perhaps just use XSetInputFocus directly, but I was trying to think of the case where a window is borderless and not fullscreen, so this is why I think of <Enter> and <Leave> events.
For the other, I know that X11 also has XWarpPointer, no idea about glutWarpPointer, I don't know any GLUT. If none of the gem devs want it, you could make yourself a very small external that wouldn't depend on gem but would just call glutWarpPointer or XWarpPointer. I know that for the latter, the code wouldn't need to be more than 20 lines.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada