cbuchner1 wrote:
> 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
> ...
> 



cbuchner1 wrote:
> A followup: inserting the following line into both #else branches fixes it
> 
> const unsigned int ctx = state.getContextID();
> 


Ah, the woes of trying to have support for multiple OSG version at the same 
time. I did some refactoring yesterday and this bug obviously slipped through 
without being tested. Sorry about that. 

Another user already submitted a pull request with a fix, which is merged.

Best regards
Björn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65002#65002





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to