Hi Roger,
VTP really need migrating to osgViewer... as it provide more OSG capabilities...
However, osg should still be able to work with just plain SceneView,
but given how complex the rendering back end is I can't really give
guidance without sitting down with the particular usage model in mind
and the code in front of me. Given I don't have something that will
reproduce your usage model if front of me I'll just have defer to what
you come up with.
When you get it working just send me the changes then I'll review it
and try to synthesis your usage model in my head when reviewing the
changes.
Robert.
On Fri, Dec 5, 2008 at 2:24 PM, Roger James <[EMAIL PROTECTED]> wrote:
> 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
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org