Thanks Johannes, fix looks good, now merged and submitted to svn/trunk.

On Wed, Feb 9, 2011 at 2:24 PM, Johannes Bäuerle <[email protected]> wrote:
> Hi,
>
> l discovered that the shader class(/src/osg/Shader.cpp) shows wrong behavior 
> when using binary shaders . When shader objects are compared the reference 
> pointer behind the  _shaderBinary member is not included in the comparison.
>
> I included binary shaders into an osgt model file. These shaders only 
> consists of the binary shader code, I did not supply the text version 
> additionally. When loading the model  the osg::Optimizer threw away all 
> shaders except the first one. In the current trunk version of the file two 
> shader objects are identical despite differing _shaderBinary members as the 
> compare method of the Shader class does not include the comparison of that 
> member.
>
> The fix in this submission adds the check for identity of the referenced 
> binary shaders to the shader class.
>
> When comparing two shader objects with text source shaders the new lines of 
> comparison are not even executed as the comparison returns false in the 
> previous lines when the text shaders differ.
>
> With this fix I get expected behavior, the Optimizer handles the different 
> shaders correctly.
>
>
> Thank you!
>
> Cheers,
> Johannes
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=36495#36495
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/shader_126.zip
>
>
> _______________________________________________
> 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