a very simple pyramide texcoord initialization. osg::Vec2Array* texcoords = new osg::Vec2Array(5); (*texcoords)[0].set(0.00f,0.0f); // tex coord for vertex 0 (*texcoords)[1].set(0.25f,0.0f); // tex coord for vertex 1 (*texcoords)[2].set(0.50f,0.0f); // "" (*texcoords)[3].set(0.75f,0.0f); // "" (*texcoords)[4].set(0.50f,1.0f); // "" PyramideGeometry->setTexCoordArray(0,texcoords);
yet i dont seem to get it ... i want it to be osg::Vec2Array* texcoords = new osg::Vec2Array(5); (*texcoords)[0].set(0.00f,0.0f); // tex coord for vertex 0 (*texcoords)[1].set(1.00f,0.0f); // tex coord for vertex 1 (*texcoords)[2].set(0.00f,0.0f); // "" (*texcoords)[3].set(1.00f,0.0f); // "" (*texcoords)[4].set(0.50f,1.0f); // "" pyramidGeometry->setTexCoordArray(0,texcoords); (*texcoords)[0] forward left (*texcoords)[1] forward right (*texcoords)[2] left back (*texcoords)[3] right back (*texcoords)[4] peak .set( Xf, Yf) // this rules I have coded mostly on DirectX sdk before, mayeb they turned my head around ? hehe whould be nice with some help here... -- Johan Johnsson Computer Game Developer Student at Powerhouse, Sweden
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
