Ok, I've discovered the seemingly innocuous problem. When I had tried to comment out all the shader related code in the GetGeode function, I was left with this:
Code: osg::Geode* getGeode( osg::Texture2D& targetTexture ) { osg::Geode* geode = new osg::Geode; geode->setName("quad"); osg::Vec3 llCorner = osg::Vec3(-0.5,0,-0.5); osg::Vec3 width = osg::Vec3(1,0,0); osg::Vec3 height = osg::Vec3(0,0,1); ////////// // QUAD // ////////// osg::Geometry* geom = osg::createTexturedQuadGeometry( llCorner, width, height ); geode->addDrawable( geom ); geode->getOrCreateStateSet()->setTextureAttribute( 0, &targetTexture, osg::StateAttribute::ON ); return geode; } This code resulted in this: [Image: http://img98.imageshack.us/img98/5796/craph.jpg ] Instead of this: [Image: http://img34.imageshack.us/img34/7946/correctj.jpg ] The problem was with the use of setTextureAttribute function. I was seeing the osg::StateAttribute::ON parameter and was fooled into thinking that was doing something. So substituting setTextureAttributeAndModes did the trick. Lesson learned. Thanks Mick. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17772#17772 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org