On Fri, Nov 14, 2008 at 6:52 AM, Jon Kleiser <[EMAIL PROTECTED]> wrote: > Hi, > > When playing with the spheres demo, I noticed that I could use the > scroll wheel on the mouse to move the observer/camera back and forth. > I cannot remember having seen scroll wheel event handling in other > (basic) OpenGL applications before. Are these events notified via > standard OpenGL callbacks, or is Factor listening to events coming > from the OS itself? >
Hi Jon, It appears that the spheres app gains access to the mouse wheel through factor's "gesture" system. The spheres-gadget is a subclass of the demo-gadget. The demo-gadget handles various gestures, including mouse-scroll. Have a look at the gesture handling table at the bottom of demo-support.factor, which we can see calling zoom-demo-gadget upon mouse-scroll. OpenGL abstracts drawing in a nice way, but does not concern itself with user input (as far as I know)... The most likely scenario is that factor is handling user input in a per-platform way using typical OS facilities and is generating the factor specific cross platform gestures that the various gadgets can handle in a clean way. Hope that helps, -Harold ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
