[osg-users] Joystick support in OSG

Chris Hanson xenon at alphapixel.com
Mon Nov 2 07:55:18 PST 2015


I've used VRPN for this task. The osgVRPN project worked fine last I used
it, but that was a while ago.

On Mon, Nov 2, 2015 at 1:51 AM, Jan Ciger <jan.ciger at gmail.com> wrote:

> Hello,
>
>
> On Mon, Nov 2, 2015 at 9:35 AM, Elias Tarasov <elias.tarasov at gmail.com>
> wrote:
> > Hi!
> >
> > Which is the best way of supporting joystick's input in modern OSG?
> > OSG Cookbook says it's a Directinput 3rdParty lib, but looking into OSG
> trunk code it seems that last update was done 5 years ago. SDL was updated
> 5 month ago, but that comment in the last commit
> >
> >
> >>
> >> OpenSceneGraph\src\osgPlugins\sdl\JoystickDevice.cpp(42): error C2664:
> 'const char *SDL_JoystickName(SDL_Joystick *)' : cannot convert argument 1
> from 'int' to 'SDL_Joystick *'
> >> due to changes in the SDL api.
> >>
> >> Tested with Visual Studio Express 2013; SDL 2.0.1"
> >>
> >
> >
> > makes me uncertain about that choice.
> >
> > Could anybody please provide more consistent info?
>
> That code looks like it was written for the older pre 2.x SDL and
> nobody has updated it yet.
>
> You can either try to update that one (the SDL 1.x -> 2.x transition
> is fairly simple) or simply use SDL 2.0 and handle the input outside
> of OSG. The plugin doesn't do much anyway - just reads the device and
> sends OSG events.
>
> Alternatively, depending on what do you need the joystick for, you can
> use also VRPN/OSVR - that will get you device independence (e.g. you
> could emulate a joystick with something else or swap the devices at
> runtime). Overkill for a simple application, but if you are building
> some sort of virtual reality system then VRPN/OSVR are likely the
> tools to go for.
>
> J.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Code Forensics • Digital Imaging • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151102/2bfb1b6c/attachment-0003.htm>


More information about the osg-users mailing list