[osg-users] Oculus+OSG

Christian Buchner christian.buchner at gmail.com
Wed Sep 2 02:06:17 PDT 2015


Trying to build the current osgoculus master branch against Oculus SDK
0.7.0.0 using OSG 3.2.1

the following code from oculusdevice.cpp is making trouble. For OSG 3.2
the variable "ctx" is undefined.

void OculusTextureBuffer::setRenderSurface(const osg::State& state)
{
#if(OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0))
    const osg::GLExtensions* fbo_ext = state.get<osg::GLExtensions>();
#else
    const osg::FBOExtensions* fbo_ext = osg::FBOExtensions::instance(ctx,
true);
#endif
...

void OculusDepthBuffer::setRenderSurface(const osg::State& state)
{
#if(OSG_VERSION_GREATER_OR_EQUAL(3, 4, 0))
    const osg::GLExtensions* fbo_ext = state.get<osg::GLExtensions>();
#else
    const osg::FBOExtensions* fbo_ext = osg::FBOExtensions::instance(ctx,
true);
#endif
...


2015-09-01 16:31 GMT+02:00 Jan Ciger <jan.ciger at gmail.com>:

> On Tue, Sep 1, 2015 at 2:57 PM, Christian Buchner
> <christian.buchner at gmail.com> wrote:
> >
> > In this case I am using a slightly modified DirectShow OSG plug-in,
> running
> > the osgviewer in single threaded mode. The plug-in provides an
> > osg::ImageStream and updates a texture that is displayed in the OSG
> scene.
> > The camera is an USB 3.0 model, and I would expect it to be one of the
> > fastest "web cams" out there.
>
> The DirectShow filter chain alone will add you several frames of
> latency easily. DirectShow is far from a real time, low latency API.
>
> The fact that the camera is an USB 3.0 model is a red herring - that
> only affects how fast it could *theoretically* transfer data but has
> no impact on the various buffering and processing done once the data
> are in your machine.
>
> > I am hoping that OpenGL applications also benefit from the low level
> driver support created for the Oculus and similar VR devices.
>
> Even if they didn't, even the plain old Rift DK1 has a sub 20ms
> latency. So that is certainly not the source of your problem.
>
> J.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150902/ee6c1ae8/attachment-0002.htm>


More information about the osg-users mailing list