Hi Chris,

I've just reviewed your changes to the ReaderWriter3DS.cpp and feel
that it could be improved by caching the osg::CullFace at the topmost
stateset attached to the loaded 3DS model and then have the
GL_CULL_FACE model enabled/disabled appropriately for each StateSet.
This approach would lead to a more efficient scene graph.

Robert.

On 10 October 2011 14:05, Chris Denham <[email protected]> wrote:
> This is a small submission that adds backface cull for objects with single 
> sided 3DS material.
>
> Since there seems to be no explicit backface cull option in the 3DS format, 
> it seems to be a reasonable assumption that objects with single sided 
> materials will require backface cull.
>
> If it adds any weight to the validity of this assumption, it's worth noting 
> that the writer code for this plugin also makes the same assumption in 
> reverse, i.e. OSG objects with CullFace attribute are written out to 3DS with 
> 'mat->two_sided = 0', so there is a certain logic in implementing this so the 
> 'round trip' then does not lose the 'two_sided' option state in 3DS format 
> during the 'round trip'.
>
> My submission is based on trunk at rev 12829.
>
> Chris Denham
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=43293#43293
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/readerwriter3ds_205.cpp
>
>
> _______________________________________________
> 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