Converted code dependant on osg::Texture across to its replacement osg::Texture2D.

This commit is contained in:
Robert Osfield
2002-08-25 15:31:44 +00:00
parent 61ff1c7b0a
commit 8e75f531e3
42 changed files with 149 additions and 156 deletions

View File

@@ -8,7 +8,7 @@
#include <osg/Matrix>
#include <osg/GL>
#include <osg/StateSet>
#include <osg/Texture>
#include <osg/Texture2D>
#include <osg/BlendFunc>
#include <osg/TexEnv>
#include <osg/Material>
@@ -137,10 +137,10 @@ void osgParticle::ParticleSystem::setDefaultAttributes(const std::string &textur
stateset->setAttributeAndModes(material, osg::StateAttribute::ON);
if (!texturefile.empty()) {
osg::Texture *texture = osgNew osg::Texture;
osg::Texture2D *texture = osgNew osg::Texture2D;
texture->setImage(osgDB::readImageFile(texturefile));
texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
texture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);
stateset->setTextureAttributeAndModes(texture_unit, texture, osg::StateAttribute::ON);
osg::TexEnv *texenv = osgNew osg::TexEnv;