Hi,
How can I map 5 different JPEG file on a "single" pyramid geometry
with indexed vertex array? I want to use exatly indexed vertices as in
my code without texture:
osg::Geometry* p_gePyramid = new osg::Geometry;
osg::Vec3Array* p_vaVertices = new osg::Vec3Array();
osg::DrawElementsUInt* p_deIndices = new
osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
p_vaVertices->push_back( osg::Vec3(0, 0, 0) ); // front left
p_vaVertices->push_back( osg::Vec3(2, 0, 0) ); // front right
p_vaVertices->push_back( osg::Vec3(2, 2, 0) ); // back right
p_vaVertices->push_back( osg::Vec3( 0,2, 0) ); // back left
p_vaVertices->push_back( osg::Vec3( 1, 1,2) ); // peak
p_deIndices->push_back(3);
p_deIndices->push_back(2);
p_deIndices->push_back(1);
p_deIndices->push_back(0);
p_gePyramid->addPrimitiveSet(p_deIndices);
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/