Hi Wojtek,

Thanks for the explanation.  This clarifies things puts my mind at rest.

Cheers,
Robert.

On Sat, Oct 10, 2009 at 3:10 PM, Wojciech Lewandowski
<[email protected]> wrote:
> Hi Robert,
>
>>> ref_ptr usage changes made on 9th of June  broke VirtualProgram used
>>> in osgShaderCompositor example.
>>
>> I'm curious what changes to break the osgshadercompositer?  ref_ptr<>
>> hasn't actually changed at all since last year.  So I presume you must
>> be talking about changes to osgshadercompositer?
>
> example: osgshadercompositor   file: VirtualProgram.cpp
> method: osg::Shader VirtualProgram::setShader( const string & semantic,
> sog::Shader * shader )
>
> on 9th of july:
> implicit cast from ref_ptr<Shader> to Shader* on return from this method was
> replaced with ref_ptr::release() call
> ref_ptr::release  was effectively reseting shader pointer which was still in
> use. And this change broke the example.
>
> So with my submission I replaced ref_ptr::release() with ref_ptr::get()
> which does not zero ref_ptr still being used.
>
>>> Taking the opportunity I modified the code a
>>> little to use earth sphere as default model. Cow.osg used previously was
>>> not
>>> looking good in advanced example. I also changed default to advanced
>>> example, because its more informative with labels describing virtual
>>> programs used to render the objects.
>>
>> Working on the presumption that the new code is correct, I've gone
>> ahead and merged and submitted.  You first sentence that I query above
>> does make me wonder about whether you mean that there is something
>> else external to osgshadercompositor that is affecting things so would
>> like clarification to set my mind at ease.
>
> Maybe you remember this, maybe you don't: My original VirtualProgram code
> included two exmples Simple and Advanced.
> Simple was using cow.osg to demo VirtualProgram functionality.
> Advanced was using sphere model to demo  more advanced VirtualProgram use.
> When adding to osg examples, you had merged them together into one example
> which you named osgShaderCompositor. Side effect of this merge was default
> usage of cow.osg as a model in both examples. Advanced example was tailored
> to sphere model and was not looking right with other models, while Simple
> was looking good with every model so I replaced default model to be rather
> sphere from Advanced example.
>
> I hope all is clear now.
> Cheers,
> Wojtek
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to