J-S,

It turned out that I was NOT using ref_ptr. I made the correction and it no
longer crashes...:).

I also moved my shader switch to the UpdateCallback and things work just
great once I synchronized the OGL rendering.

Problems solved. THANK YOU!

-Shayne

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jean-Sébastien Guay
Sent: Friday, November 14, 2008 1:08 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] shaders in OSG...

Hi Shayne,

> At this point, anything will help. I believe I'm using a ref pointer but I
> will double check. I tried following the paradigm outlined in the
osgshaders
> example which seems to be "newing" the same way I'm doing below (i.e. new
> osg::Program).

As long as you're using ref_ptr, that's fine. It's just a common gotcha...

> The reason for the postdraw callback is that I'm rendering OGL symbology
on
> top of an OSG view. I don't want the shader to be on when I render the
> symbology. Perhaps I need to turn shaders off in an update callback before
> the post drawback is hit.?.?

Yes. You can always use some way to synchronize so that the OGL stuff 
doesn't render until the update callback has run.

> On the complete program, it's a little difficult to include everything
since
> my email machine is different from my development machine. If it's needed,
I
> could try to include the whole program as an attachment...

I don't mean the whole program (in fact, we'd prefer not the whole 
program). Just modify a small example to demonstrate the problem (even 
with a trivial shader, say that turns everything red).

So for example, modify 
OpenSceneGraph/applications/osgviewer/osgviewer.cpp, apply a shader to 
the loaded file, and then remove and re-add the shader in the same way 
as you do in your app. If this reproduces the problem, send it here.

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to