<div dir="ltr">I've used VRPN for this task. The osgVRPN project worked fine last I used it, but that was a while ago.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 2, 2015 at 1:51 AM, Jan Ciger <span dir="ltr"><<a href="mailto:jan.ciger@gmail.com" target="_blank">jan.ciger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<span class=""><br>
<br>
On Mon, Nov 2, 2015 at 9:35 AM, Elias Tarasov <<a href="mailto:elias.tarasov@gmail.com">elias.tarasov@gmail.com</a>> wrote:<br>
> Hi!<br>
><br>
> Which is the best way of supporting joystick's input in modern OSG?<br>
> 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<br>
><br>
><br>
>><br>
>> OpenSceneGraph\src\osgPlugins\sdl\JoystickDevice.cpp(42): error C2664: 'const char *SDL_JoystickName(SDL_Joystick *)' : cannot convert argument 1 from 'int' to 'SDL_Joystick *'<br>
>> due to changes in the SDL api.<br>
>><br>
>> Tested with Visual Studio Express 2013; SDL 2.0.1"<br>
>><br>
><br>
><br>
> makes me uncertain about that choice.<br>
><br>
> Could anybody please provide more consistent info?<br>
<br>
</span>That code looks like it was written for the older pre 2.x SDL and<br>
nobody has updated it yet.<br>
<br>
You can either try to update that one (the SDL 1.x -> 2.x transition<br>
is fairly simple) or simply use SDL 2.0 and handle the input outside<br>
of OSG. The plugin doesn't do much anyway - just reads the device and<br>
sends OSG events.<br>
<br>
Alternatively, depending on what do you need the joystick for, you can<br>
use also VRPN/OSVR - that will get you device independence (e.g. you<br>
could emulate a joystick with something else or swap the devices at<br>
runtime). Overkill for a simple application, but if you are building<br>
some sort of virtual reality system then VRPN/OSVR are likely the<br>
tools to go for.<br>
<span class="HOEnZb"><font color="#888888"><br>
J.<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.com <a href="http://www.alphapixel.com/" target="_blank">http://www.alphapixel.com/</a></div><div style="text-align:center">Training • Consulting • Contracting</div><div style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL</div><div style="text-align:center"><span style="font-size:12.8000001907349px">Legal/IP •</span><span style="font-size:12.8000001907349px"> </span><span style="font-size:12.8000001907349px">Code Forensics •</span><span style="font-size:12.8000001907349px"> </span>Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android</div><div style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a> <a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]</div></div></div></div></div>
</div>