[sldev] adding support for a new input device to the SL viewer

Maurizio de Pascale mdepascale at dii.unisi.it
Thu Sep 13 08:46:53 PDT 2007


Hi everybody,
I'm working at adding support to the SL viewer for a new input device.
the short term goal, in order to learn how the input system is designed,
is to just replace the mouse (actually provide a non mutually exclusive
alternative).
the long term goal is to have the new device controlling operations not
handled by the mouse.

can anyone point me to the sources/classes/functions building up the
input system or provide docs on this?



working on the short goal:
So far, by tracing an execution, I've seen that mouse input are received
through standard window messages (i'm working on windows version) by the
LLWindowWin32 class and then passed up to LLViewerWindow class through
the handleMouseXXX methods.

it seems to me that the two invocations in the main loop:
> gKeyboard->scanKeyboard();
> LLViewerJoystick::scanJoystick();
do not handle mouse input.

are this correct?



additionally, what is the best way to proceed:
1) use the new device state to generate and post mouse messages on the
queue and have them handled as coming out from the mouse?
2) calling directly the handleMouseXXX methods?
3) ignoring the mouse input handling and calling directly "what's called
from" handleMouseXXX methods to have viewer react accordingly?

at a first glance, for the long term, having a class like
LLViewerJoystick looks like the way to go. Am I right?


Thank You in advance, every suggestion will be really appreciated.



regards,
Maurizio de Pascale
mdepascale at dii.unisi.it


More information about the SLDev mailing list