[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

SDL vs GLUT (multiplexing of mouse and keyboard events)

I have observed that SDL does better multiplexing of mouse and
keyboard events than GLUT.

For instance, consider we have a space program with a space ship
moving.  I am using mouse to control the direction of motion and
keyboard for applying forward thrust.  With SDL event handling it
works perfect, but with GLUT, the mouse events are given priority over
keyboard events.

Initially, say, I am moving the ship forward using keyboard.  When I
move the mouse, this forward motion virtually stops and the ship just
changes direction and when I stop the movement of mouse, the ship's
forward motion starts again.

How can this problem be solved with GLUT?  Can multi-threading help in
any way?

PUI uses GLUT's event callbacks.  So using PUI, I will have the same
problem.  Isn't PUI written using SDL event handling?

Abhir Joshi
TransWarp Systems
Astronomical Working Models and 3D Simulation Softwares