Hi All,

Looking for TextureCubeMap I didn't found example or tutorials...

I'm looking for applying a second texture on a geode, not depending on old
texture coordinates...

I've tried this but it render a single color (pixel ?) of the texture...

osg::TextureCubeMap* texcube = new osg::TextureCubeMap();
>       texcube->setImage(osg::TextureCubeMap::POSITIVE_X, _texGrad.get());
>       texcube->setImage(osg::TextureCubeMap::NEGATIVE_X, _texGrad.get());
>       texcube->setImage(osg::TextureCubeMap::POSITIVE_Y, _texGrad.get());
>       texcube->setImage(osg::TextureCubeMap::NEGATIVE_Y, _texGrad.get());
>       texcube->setImage(osg::TextureCubeMap::POSITIVE_Z, _texGrad.get());
>       texcube->setImage(osg::TextureCubeMap::NEGATIVE_Z, _texGrad.get());
>
>       osg::BoundingBox bound = geom->getBound();
>       texcube->setTextureSize(bound.xMax() - bound.xMin(), bound.yMax() -
> bound.yMin());
>
>     texcube->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_BORDER);
>     texcube->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_BORDER);
>     texcube->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_BORDER);
>
>     geode->getOrCreateStateSet()->setTextureAttributeAndModes(1, texcube,
> osg::StateAttribute::ON);
>     geode->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::ON);


Any ideas ? examples ?

Thanks.

Regards.
   Vincent.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to