Hello Renan, > I've read the Tutorial and while compiling, there has been detected > that I don't have the osg::DrawElementsUInt in my computer.
You should include <osg/Geometry>, that should bring osg::DrawElementsUInt. It's actually defined in <osg/PrimitiveSet>, but you shouldn't need to include that directly as you should be including <osg/Geometry> anyways. And it should definitely be part of your OSG distribution, or else lots of OSG examples won't compile. > Well, besides that I've got another question. In the above-mentioned > tutorial, there is a part of the example code in which the programmer uses > the DrawElementsUInt class to somehow unite the group of points for each > face. Will I need to instantiate one object from DrawElementUInt for each of > the awful lot of faces I have in our approximation of a sphere? No, if you want your whole sphere to be a single list of faces you can have a single DrawElementsUInt (of type osg::PrimitiveSet::TRIANGLES) and each group of 3 indices will form a face. In the tutorial I think they wanted to show you can have multiple PrimitiveSets if you want, but they could have used one for the base (QUADS) and one for the sides (TRIANGLES, all four triangles together in the same PrimitiveSet) and it would have worked too. > And what about changing the color of the shape, does > it have to be as laborious as it's taught in that Tutorial? It all depends on what you want to do. The tutorial uses vertex coloring to assign a color to each vertex of the geometry. You can assign a single color to the whole geometry by doing: osg::Vec4Array* colors = new osg::Vec4Array; colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); // white // ... pyramidGeometry->setColorArray(colors); pyramidGeometry->setColorBinding(osg::Geometry::BIND_OVERALL); And then you could change the appearance of your sphere by assigning a texture to it, or by giving it a material (see osg::Material). Again for that there are tutorials, and the examples that come with the OSG are a treasure trove of code and information. Good luck, J-S -- ______________________________________________________ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org