Hi Li, I have just added the StateSetManipulator to the osgshapde example to see if back face culling is the reason, what I found is that the windings on the triangles are the reverse of what they should be. Is this probably down to a recent change to avoid using GL_QUADS for GLES/GL3 builds. I'll have a look at fixing this.
This winding issue "might" be what is causing the problems you are seeing, it would be worth disabling back facing culling in your app to see if that changes things. Robert. On 28 March 2017 at 16:02, Robert Osfield <[email protected]> wrote: > Hi Li, > > How are you rendering the height field? > > Does the osgshape example work OK for you? > > Robert. > > On 28 March 2017 at 15:13, Li Chi <[email protected]> wrote: >> Hi Robert, >> >> When I create a heightfield (640x320) the generated mesh distorted, please >> take a look at the attached picture. >> >> ... >> heightfield->allocate(640, 320); >> heightfield->setXInterval(1.0f); >> heightfield->setYInterval(1.0f); >> heightfield->setSkirtHeight(1.0f); >> ... >> >> ENV: Win10 + VS2015 >> >> Thank you! >> >> Cheers, >> Li >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=70581#70581 >> >> >> >> >> Attachments: >> http://forum.openscenegraph.org//files/heightfield_176.png >> >> >> _______________________________________________ >> 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

