I have a graph with a cameraNode in it that requests a render to a
FRAME_BUFFER_OBJECT, I have just come across a system were this falls back
to PIXEL_BUFFER_RTT in RenderStage::RunCameraSetup.
This causes an immediate crash in RenderStage::draw when the following piece
of code is executed
if (_cameraRequiresSetUp)
{
runCameraSetUp(renderInfo);
}
osg::State& state = *renderInfo.getState();
osg::State* useState = &state;
osg::GraphicsContext* callingContext = state.getGraphicsContext();
osg::GraphicsContext* useContext = callingContext;
osg::GraphicsThread* useThread = 0;
osg::RenderInfo useRenderInfo(renderInfo);
if (_graphicsContext.valid() && _graphicsContext != callingContext)
This crash occurs because callingContext is NULL. My application (VTP
Enviro) uses osgUtil::SceneView directly and does not use osgProducer (or so
I thought). I have not in the past done anything about the _renderInfo in
osgUtil::SceneView just leaving it as set up by default. This means that
when it is referred to here it contains a state with a NULL GraphicsContext.
I looked into fixing this by setting the GraphicsContext in the SceneView to
something. But the question is what? The GraphicsContext that has been
created in the camera setup is initialized by Producer (via
s_s_createGraphicsContextCallback) which I had no idea I was using. I am
rendering to a wxWidgets GL canvas which has its own way of managing
rendering contexts. So is this all going to get very confused?
I think my best solution is to stop the CameraNode falling back to a Pbuffer
and just force it all the way down to frame buffer.
Comments, advice, anyone?
Roger
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/