This is what we use every day and it works http://www.vis-sim.com/osg/osg_faq_1.htm#f47
we also tend to do stateSet->setDataVariance(osg::Object::DYNAMIC); as well Personally I would not use ref_ptr on the state here but that's me Also were are doing this ? Gordon Tomlinson Product Manager 3d Technology & Project Wyvern Overwatch(r) An Operating Unit of Textron Systems -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Inos Tranac Sent: Wednesday, April 14, 2010 9:49 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How to not show textures Hi everyone, I'm having a tough time preventing textures from showing in the scene. I've tried the approach explained in the QuickStartGuide, but I'm obviously missing something bigtime... Here is the main part of the code: Code: unsigned int mode = osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF; osg::ref_ptr osg::StateSet state = sceneNoColor->getOrCreateStateSet(); for( unsigned int ii=0; ii< 12; ii++) { state->setTextureMode( ii, GL_TEXTURE_1D, mode ); state->setTextureMode( ii, GL_TEXTURE_2D, mode ); state->setTextureMode( ii, GL_TEXTURE_3D, mode ); } Frankly, I wouldn't mind removing the textures alltogether, but I'm not sure how to do that efficiently. I would very much appreciate any suggestions about how to make this work. Thank you in advance. Inos ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26773#26773 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org