<div dir="ltr"><br>A followup: inserting the following line into both #else branches fixes it<br><br>const unsigned int ctx = state.getContextID();<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-02 11:06 GMT+02:00 Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>Trying to build the current osgoculus master branch against Oculus SDK 0.7.0.0 using OSG 3.2.1<br><br></div>the following code from oculusdevice.cpp is making trouble. For OSG 3.2  the variable "ctx" is undefined.<br><div><br>void OculusTextureBuffer::setRenderSurface(const osg::State& state)<br>{<br>#if(OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0))<br>    const osg::GLExtensions* fbo_ext = state.get<osg::GLExtensions>();<br>#else<br>    const osg::FBOExtensions* fbo_ext = osg::FBOExtensions::instance(ctx, true);<br>#endif<br>...<br><br>void OculusDepthBuffer::setRenderSurface(const osg::State& state)<br>{<br>#if(OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0))<br>    const osg::GLExtensions* fbo_ext = state.get<osg::GLExtensions>();<br>#else<br>    const osg::FBOExtensions* fbo_ext = osg::FBOExtensions::instance(ctx, true);<br>#endif<br>...<br><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-09-01 16:31 GMT+02:00 Jan Ciger <span dir="ltr"><<a href="mailto:jan.ciger@gmail.com" target="_blank">jan.ciger@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Tue, Sep 1, 2015 at 2:57 PM, Christian Buchner<br>
<<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>> wrote:<br>
><br>
> In this case I am using a slightly modified DirectShow OSG plug-in, running<br>
> the osgviewer in single threaded mode. The plug-in provides an<br>
> osg::ImageStream and updates a texture that is displayed in the OSG scene.<br>
> The camera is an USB 3.0 model, and I would expect it to be one of the<br>
> fastest "web cams" out there.<br>
<br>
</span>The DirectShow filter chain alone will add you several frames of<br>
latency easily. DirectShow is far from a real time, low latency API.<br>
<br>
The fact that the camera is an USB 3.0 model is a red herring - that<br>
only affects how fast it could *theoretically* transfer data but has<br>
no impact on the various buffering and processing done once the data<br>
are in your machine.<br>
<span><br>
> I am hoping that OpenGL applications also benefit from the low level driver support created for the Oculus and similar VR devices.<br>
<br>
</span>Even if they didn't, even the plain old Rift DK1 has a sub 20ms<br>
latency. So that is certainly not the source of your problem.<br>
<span><font color="#888888"><br>
J.<br>
</font></span><div><div>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">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></div>
</div></div></blockquote></div><br></div>