Re: [osg-users] Tiled textures on osg::Box

2008-02-15 Thread Robert Osfield
Hi Frans, If you want fine grained control over rendering then osg::Box/osg::ShapeDrawable are not the things to use. osg::Box is really just a shape primitive that exist to support mathematical primitives used in physics engines. ShapeDrawable does allow you to render these shapes but its just

Re: [osg-users] Tiled textures on osg::Box

2008-02-15 Thread Ulrich Hertlein
Jean-Sébastien Guay wrote: >> m_osg_shape = new osg::ShapeDrawable( new osg::Box( >> osg::Vec3f( 0, 0, -0.005f ), 29.7f, 21.0f, 0.01f ) ); >>... >> >> but the setWrap() command doesn't seem to have any effect for me. I >> guess I have to specify the relative alignment for the texture

Re: [osg-users] Tiled textures on osg::Box

2008-02-14 Thread Jean-Sébastien Guay
Hello Frans, > m_osg_shape = new osg::ShapeDrawable( new osg::Box( > osg::Vec3f( 0, 0, -0.005f ), 29.7f, 21.0f, 0.01f ) ); > osg::Image* image = osgDB::readImageFile( "gras.jpg" ); > osg::Texture2D* tex2d = new osg::Texture2D( image ); > tex2d->set

[osg-users] Tiled textures on osg::Box

2008-02-13 Thread Frans Fürst
Hi everyone, I'm afraid I have a very simple question, but I didn't find answer in the examples or tutorials. Perhaps you can give me a small hint.. I want to add texture to an new osg::Box, and I want to have it repeated. So I tried: m_osg_shape = new osg::ShapeDrawable( new osg::Bo