Hi Robert,
Sorry for not being more specific. I am using "something else" (VTP) so
I am driving osgUtil::SceneView from our own code. It is very old code
in this area, we are still building against 2.6.0. However I had a
quick check against the latest svn and as far as I can see the problem
still exists. I patched a couple of places in RenderStage to check
callingContext non NULL before using it, and things appear to work but
I have not done a decent test. Also fixing it this was really worries
me!
if (_graphicsContext.valid() && callingContext
&&_graphicsContext != callingContext)
Roger
Robert Osfield wrote:
Hi Roger,
What they of viewer code are you using? osgViewer? Something else?
Robert.
On Fri, Dec 5, 2008 at 1:53 PM, Roger James <[EMAIL PROTECTED]> wrote:
I have an app which uses osg::Camera to render to a shadow map. This works
fine until the I try to run it old hardware that does not support frame
buffer objects and the render target falls back to a one which causes a
seperate GraphicsContext to be set up. This means that the following piece
of code in RenderStage::draw fails because callingContext is not a valid
pointer.
if (_graphicsContext.valid() && _graphicsContext != callingContext)
{
// show we release the context so that others can use it?? will do
so right
// now as an experiment.
callingContext->releaseContext(); !!! Crashes here
This is because _graphicsContext is being set to the context created in the
runCameraSetup but callingContext is set to
_renderInfo.getState()->getGraphicsContext() which has not been set up by
osgUtil::SceneView.
Do I need to fix this by putting a valid GraphicsConext in the Sceneview
RenderInfo. If so how should I set that up (I have never bothered before).
Or should I just modify the code in RenderStage::draw like this..
if (_graphicsContext.valid() && callingContext.valid()
&&_graphicsContext != callingContext)
Comments and ideas welcome.
Thanks
Roger
|
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org