| Hello All, I've been hacking osgprerendercubemap to do fisheye correction for projection onto a dome. I have modified the example to load an osg file, and render this to the sphere surface. Everything is working swimmingly - better performance than I'd expected (this is Gentoo on a Macbook Pro) - what I need to do though, is to cull the front faces of the sphere. I had thought the following would do it: ref_ptr<ShapeDrawable> shape = new ShapeDrawable(new Sphere(Vec3(0.0f, 0.0f, 0.0f), radius * 1500.0f), hints.get()); osg::StateSet* stateset = shape->getOrCreateStateSet(); //cull front faces osg::CullFace* cullFace = new osg::CullFace(); cullFace->setMode(osg::CullFace::FRONT); stateset->setAttribute(cullFace); stateset->setMode(GL_CULL_FACE, osg::StateAttribute::ON); stateset->setAttributeAndModes(new osg::CullFace, osg::StateAttribute::ON); shape->setStateSet(stateset); Am I barking up the wrong tree? Pete Carss - Research Assistant, Immersive Vision [ i ][>][...] - Institute of Digital Art and Technology CETL (Centre for Excellence in Teaching & Learning) Experiential Learning in Environmental & Natural Sciences University of Plymouth, Drake Circus, Plymouth, PL4 8AA, Devon, UK |
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
