Ulrich Hertlein wrote: > Hi Cheng, > > On 16/7/09 3:55 AM, Cheng Guan wrote: > > > I've a problem with geometry drawing on top of a terrain. I enable > > GL_DEPTH_TEST and > > part of the geometry get culled (see figure 1) but I can the full circle > > rendered if I > > keep moving my eye point (see figure 2). If I disable the GL_DEPTH_TEST, > > the circle > > will show even when I'm behind it. I tried switching off small feature > > culling Code: > > viewer->getCamera()->setCullingMode(viewer->getCamera()->getCullingMode()& > > ~osg::CullSettings::SMALL_FEATURE_CULLING); > > > > That is not a culling problem but a depth buffer problem. Your two > geometries are too > close together and in certain situations the depth buffer precision isn't > good enough. > > What do you mean by "will show even when I'm behind it"? > > Cheers, > /ulrich > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum
Hi Ulrich, Thanks for the reply :) I'm actually drawing 1 geometry, figure 1 shows the view from 1 view point and figure 2 is when I keep moving my view point until I'm able to see the whole circle rendered correctly. Is my geometry z-fighting with the terrain? > What do you mean by "will show even when I'm behind it"? Sorry for the confusion, what I meant is I do not want my geometry to render when it is blocked by another object. With GL_DEPTH_TEST disabled, it will be rendered every time. Cheers, CG ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15030#15030 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

