HI To have geometry lit then you have to given the geometry normal's e.g. something like below
osg::Geometry* geom = new osg::Geometry(); osg::Vec3Array* normals = new osg::Vec3Array; normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); geom ->setNormalArray(normals); geom ->setNormalBinding(osg::Geometry::BIND_PER_VERTEX); Are you doing something similar to this ? If not then you need to add normal's depending on the type of shading you want you can use per-vertex, per-primitive , overall etc... Best Regards Gordon __________________________________________________________ Gordon Tomlinson Email : [EMAIL PROTECTED] YIM/AIM : Gordon3dBrit MSN IM : [EMAIL PROTECTED] Website : www.3dscenegraph.com __________________________________________________________ "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura -----Original Message----- > Subject: RE: [osg-users] Lighting / Shading problem on program [snip] > > I presume the problem geometry has Normal's defined correctly ? > > > Best Regards > > > > Gordon > Hi Gordon, Thanks for your reply... Humour me. Am I perhaps not specifying something that I should when I create these objects? I create Vertix sets in Primitive groups, and then colour sets for each primitive set. I then create the Primitive sets and link it all together as Geometry. This is then added to the main scene. Thanks, Stephen. P.S. To Robert. Thanks for the help on the mouse issue. In the end I resolved it by using 'Scrolling motion' for the PC, and 'SCROLL' for the Mac. I guess 'SCROLL' may be where I got lucky on the Mac, and assumed I would get the same info on the PC. I wonder if the trackball on the Mac mouse is implemented differently somewhere in the base OS from a normal scroll wheel? _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
