Hi Bruce,
backface culling does not work with surface normals, the front and back
faces are separated by the vertex winding.
your model might have the faces in the wrong direction - or QT might have
left openGL in an unexpected state.
maybe this could help:
                osg::ref_ptr<osg::CullFace> cf = new osg::CullFace;
                cf->setMode(osg::CullFace::FRONT);
                ss->setAttributeAndModes(cf.get(),
osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
or possibly this:
    ff = new osg::FrontFace;
    ff->setMode( inverted() ? osg::FrontFace::CLOCKWISE :
osg::FrontFace::COUNTER_CLOCKWISE);
    ss->setAttribute(ff);

Regards, Laurens.


On Thu, Aug 24, 2017 at 2:09 AM, Bruce Clay <[email protected]> wrote:

> Hi,
>
> I am using OSG 3.4 with QT 5.8 and Visual Studio 2015.  I am also using
> the QT osgWidget class I found on line.  When I load a model I can see
> parts of the inside or back side of the model.  One viewer noted that it
> looked like the surface normals are inverted.  I could not find anything in
> the osgWidget class or anything in the qtOsgWidget class that has anyeffect
> on surface normals.
>
> Any suggestion would be greatly appreciated
>
> Thank you!
>
> Cheers,
> Bruce
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71514#71514
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to