Hi Ulrich
found the solution, sorry:
Matrixd matrix;
matrix.makeScale(Vec3(scaleX, scaleY, 1.0));
ref_ptr<TexMat> matTexture = new TexMat;
matTexture->setMatrix(matrix);
// creates a new OSG geode
ref_ptr<Geode> geoGround = new Geode;
geoGround->addDrawable(new ShapeDrawable(gridGround));
// enables all the necessary states
geoGround->getOrCreateStateSet()->setTextureAttributeAndModes(0,
texGround.get(), StateAttribute::ON);
geoGround->getOrCreateStateSet()->setTextureAttributeAndModes(0,
matTexture.get(), StateAttribute::ON);
Ulrich Hertlein schrieb:
On 6/12/09 7:27 PM, Dominic Stalder wrote:
is it possible to set the textue coordinates (for repeating a texture)
of a HeightField node? If yes, how?
If you're using HeightField/ShapeDrawable then no, you cannot specify the
texture
coordinates manually. But you can achieve the same by using a TextureMatrix to
scale the
assigned texcoords to your requirements.
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org