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 <[email protected]> wrote: > Hello, > > > On Mon, Nov 2, 2015 at 9:35 AM, Elias Tarasov <[email protected]> > 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 > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] 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]
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

