Ported all the demos and loaders across to use the new multitexturing API.

This commit is contained in:
Robert Osfield
2002-07-10 11:22:24 +00:00
parent 46af97727a
commit c1fc3dcdb9
19 changed files with 105 additions and 50 deletions

View File

@@ -132,13 +132,13 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil
{
osg::Texture* osg_texture = new osg::Texture;
osg_texture->setImage(osg_image);
stateset->setAttributeAndModes(osg_texture,osg::StateAttribute::ON);
stateset->setTextureAttributeAndModes(0,osg_texture,osg::StateAttribute::ON);
if (omtl->textureReflection)
{
osg::TexGen* osg_texgen = new osg::TexGen;
osg_texgen->setMode(osg::TexGen::SPHERE_MAP);
stateset->setAttributeAndModes(osg_texgen,osg::StateAttribute::ON);
stateset->setTextureAttributeAndModes(0,osg_texgen,osg::StateAttribute::ON);
}
}
else