diff --git a/include/osg/Texture b/include/osg/Texture index cc89efe17..6f13eeb66 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -11,6 +11,7 @@ #define OSG_TEXTURE 1 #include + namespace osg { /** Texture state class which encapsulates OpenGl texture functionality.*/ @@ -202,6 +203,7 @@ class SG_EXPORT Texture : public TextureBase #else // USE_DEPRECATED_API +#ifdef USE_DEPRECATED_API #include namespace osg { @@ -210,4 +212,6 @@ namespace osg { } +#endif + #endif // USE_DEPRECATED_API diff --git a/src/Demos/osgbillboard/osgbillboard.cpp b/src/Demos/osgbillboard/osgbillboard.cpp index c916a50c3..fb9e7b47f 100644 --- a/src/Demos/osgbillboard/osgbillboard.cpp +++ b/src/Demos/osgbillboard/osgbillboard.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include @@ -59,7 +59,7 @@ osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const if (image) { osg::StateSet* stateset = new osg::StateSet; - osg::Texture* texture = new osg::Texture; + osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image); stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); geom->setStateSet(stateset); diff --git a/src/Demos/osgcopy/osgcopy.cpp b/src/Demos/osgcopy/osgcopy.cpp index 9e792a008..271a32166 100644 --- a/src/Demos/osgcopy/osgcopy.cpp +++ b/src/Demos/osgcopy/osgcopy.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Demos/osggeometry/osggeometry.cpp b/src/Demos/osggeometry/osggeometry.cpp index 0277f4a48..bb086cd23 100644 --- a/src/Demos/osggeometry/osggeometry.cpp +++ b/src/Demos/osggeometry/osggeometry.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include @@ -601,11 +601,11 @@ osg::Node* createBackground() polyGeom->addPrimitive(new osg::UShortDrawElements(osg::Primitive::QUADS,numIndices,myIndices)); // new we need to add the texture to the Drawable, we do so by creating a - // StateSet to contain the Texture StateAttribute. + // StateSet to contain the Texture2D StateAttribute. osg::StateSet* stateset = new osg::StateSet; // set up the texture. - osg::Texture* texture = new osg::Texture; + osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image); stateset->setTextureAttributeAndModes(0, texture,osg::StateAttribute::ON); diff --git a/src/Demos/osghangglide/base.cpp b/src/Demos/osghangglide/base.cpp index 868a6ed32..20933f11c 100644 --- a/src/Demos/osghangglide/base.cpp +++ b/src/Demos/osghangglide/base.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include @@ -48,11 +48,11 @@ Node *makeBase( void ) geom->addPrimitive( new DrawArrays(Primitive::TRIANGLE_FAN,0,19) ); - Texture *tex = new Texture; + Texture2D *tex = new Texture2D; tex->setImage(osgDB::readImageFile("Images/water.rgb")); - tex->setWrap( Texture::WRAP_S, Texture::REPEAT ); - tex->setWrap( Texture::WRAP_T, Texture::REPEAT ); + tex->setWrap( Texture2D::WRAP_S, Texture2D::REPEAT ); + tex->setWrap( Texture2D::WRAP_T, Texture2D::REPEAT ); StateSet *dstate = new StateSet; dstate->setMode( GL_LIGHTING, StateAttribute::OFF ); diff --git a/src/Demos/osghangglide/sky.cpp b/src/Demos/osghangglide/sky.cpp index f8458b628..80dc438fa 100644 --- a/src/Demos/osghangglide/sky.cpp +++ b/src/Demos/osghangglide/sky.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include @@ -94,7 +94,7 @@ Node *makeSky( void ) geom->setColorBinding( Geometry::BIND_PER_VERTEX ); - Texture *tex = new Texture; + Texture2D *tex = new Texture2D; tex->setImage(osgDB::readImageFile("Images/white.rgb")); StateSet *dstate = new StateSet; diff --git a/src/Demos/osghangglide/tank.cpp b/src/Demos/osghangglide/tank.cpp index 907a2a556..bbde9caf8 100644 --- a/src/Demos/osghangglide/tank.cpp +++ b/src/Demos/osghangglide/tank.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -149,10 +149,10 @@ Node *makeTank( void ) - Texture *tex = new Texture; + Texture2D *tex = new Texture2D; - tex->setWrap( Texture::WRAP_S, Texture::REPEAT ); - tex->setWrap( Texture::WRAP_T, Texture::REPEAT ); + tex->setWrap( Texture2D::WRAP_S, Texture2D::REPEAT ); + tex->setWrap( Texture2D::WRAP_T, Texture2D::REPEAT ); tex->setImage(osgDB::readImageFile("Images/tank.rgb")); StateSet *dstate = new StateSet; diff --git a/src/Demos/osghangglide/terrain.cpp b/src/Demos/osghangglide/terrain.cpp index dcd4e2b1a..56327c341 100644 --- a/src/Demos/osghangglide/terrain.cpp +++ b/src/Demos/osghangglide/terrain.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -110,7 +110,7 @@ Node *makeTerrain( void ) } - Texture *tex = new Texture; + Texture2D *tex = new Texture2D; tex->setImage(osgDB::readImageFile("Images/lz.rgb")); diff --git a/src/Demos/osghangglide/trees.cpp b/src/Demos/osghangglide/trees.cpp index ff3918bdd..e3e41d6cc 100644 --- a/src/Demos/osghangglide/trees.cpp +++ b/src/Demos/osghangglide/trees.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -216,7 +216,7 @@ Node *makeTrees( void ) getDatabaseCenterRadius( dbcenter, &dbradius ); struct _tree *t; - Texture *tex = new Texture; + Texture2D *tex = new Texture2D; tex->setImage(osgDB::readImageFile("Images/tree0.rgba")); StateSet *dstate = new StateSet; diff --git a/src/Demos/osgmultitexture/osgmultitexture.cpp b/src/Demos/osgmultitexture/osgmultitexture.cpp index cec02763c..54937a62a 100644 --- a/src/Demos/osgmultitexture/osgmultitexture.cpp +++ b/src/Demos/osgmultitexture/osgmultitexture.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include @@ -90,7 +90,7 @@ int main( int argc, char **argv ) osg::Image* image = osgDB::readImageFile("Images/reflect.rgb"); if (image) { - osg::Texture* texture = new osg::Texture; + osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image); osg::TexGen* texgen = new osg::TexGen; diff --git a/src/Demos/osgprerender/osgprerender.cpp b/src/Demos/osgprerender/osgprerender.cpp index 0fc4fca0c..fc5a98792 100644 --- a/src/Demos/osgprerender/osgprerender.cpp +++ b/src/Demos/osgprerender/osgprerender.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Demos/osgreflect/osgreflect.cpp b/src/Demos/osgreflect/osgreflect.cpp index a243b0ddc..5f2f073fe 100644 --- a/src/Demos/osgreflect/osgreflect.cpp +++ b/src/Demos/osgreflect/osgreflect.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,7 +51,7 @@ osg::StateSet* createMirrorTexturedState(const std::string& filename) osg::Image* image = osgDB::readImageFile(filename.c_str()); if (image) { - osg::Texture* texture = new osg::Texture; + osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image); dstate->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); } diff --git a/src/Demos/osgstereoimage/osgstereoimage.cpp b/src/Demos/osgstereoimage/osgstereoimage.cpp index 41668d9bd..3574d0986 100644 --- a/src/Demos/osgstereoimage/osgstereoimage.cpp +++ b/src/Demos/osgstereoimage/osgstereoimage.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include diff --git a/src/osg/CopyOp.cpp b/src/osg/CopyOp.cpp index cece1db86..d2140c6a5 100644 --- a/src/osg/CopyOp.cpp +++ b/src/osg/CopyOp.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index c68ea929f..6a86018f6 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -12,10 +12,11 @@ #include #include +#include +#include + #include -#include -#include using namespace osg; diff --git a/src/osg/TextureCubeMap.cpp b/src/osg/TextureCubeMap.cpp index 468bef3a0..4ce6c54ec 100644 --- a/src/osg/TextureCubeMap.cpp +++ b/src/osg/TextureCubeMap.cpp @@ -1,12 +1,7 @@ -#if defined(_MSC_VER) - #pragma warning( disable : 4786 ) -#endif - #include #include #include #include -#include #include #include diff --git a/src/osgGLUT/Viewer.cpp b/src/osgGLUT/Viewer.cpp index 5e3cec476..3a91d5d41 100644 --- a/src/osgGLUT/Viewer.cpp +++ b/src/osgGLUT/Viewer.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -1034,7 +1034,7 @@ void Viewer::keyboard(unsigned char key, int x, int y) // thus causing them to all use the same texture attribute, hence // preventing a state attribute change due to unused textures. globalStateSet->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF); -// static osg::ref_ptr blank_texture = osgNew osg::Texture; +// static osg::ref_ptr blank_texture = osgNew osg::Texture2D; // globalStateSet->setTextureAttribute(0,blank_texture.get()); } break; diff --git a/src/osgParticle/ParticleSystem.cpp b/src/osgParticle/ParticleSystem.cpp index 0cae3daa0..046363a85 100644 --- a/src/osgParticle/ParticleSystem.cpp +++ b/src/osgParticle/ParticleSystem.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -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; diff --git a/src/osgPlugins/dw/ReaderWriterDW.cpp b/src/osgPlugins/dw/ReaderWriterDW.cpp index 76dcc29be..3f20b09fa 100644 --- a/src/osgPlugins/dw/ReaderWriterDW.cpp +++ b/src/osgPlugins/dw/ReaderWriterDW.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,10 +57,10 @@ public: //ctx=osgDB::readImageFile(nm); if (ctx) { ctx->setFileName(fname); - tx=new Texture; + tx=new Texture2D; tx->setImage(ctx); - tx->setWrap(Texture::WRAP_S, Texture::REPEAT); - tx->setWrap(Texture::WRAP_T, Texture::REPEAT); + tx->setWrap(Texture2D::WRAP_S, Texture2D::REPEAT); + tx->setWrap(Texture2D::WRAP_T, Texture2D::REPEAT); } osg::TexEnv* texenv = new osg::TexEnv; texenv->setMode(osg::TexEnv::MODULATE); @@ -176,7 +176,7 @@ private: enum atten {NONE, INVERSE_DIST, INVERSE_SQUARE} atyp; float bright,halfIn,halfOut,falloff; // light brightness Image *ctx; - Texture *tx; + Texture2D *tx; int _lightnum; StateSet *dstate; // used to represent the dw material in OSG }; diff --git a/src/osgPlugins/dx/DXWriter.cpp b/src/osgPlugins/dx/DXWriter.cpp index 521f3d1c9..35bc0c9d9 100644 --- a/src/osgPlugins/dx/DXWriter.cpp +++ b/src/osgPlugins/dx/DXWriter.cpp @@ -104,7 +104,7 @@ #include #include #include -#include +#include #include #include #include @@ -427,8 +427,8 @@ class MyStateSet // TEXTURE / TEXTURE_0 const osg::Image *image; - osg::Texture::WrapMode wrap_s, wrap_t; - osg::Texture::FilterMode min_filter, mag_filter; + osg::Texture2D::WrapMode wrap_s, wrap_t; + osg::Texture2D::FilterMode min_filter, mag_filter; // TEXENV osg::TexEnv::Mode texture_func; @@ -1999,12 +1999,13 @@ void MyStateSet::Query( const osg::StateSet &sset ) shininess_f_and_b = mat.getShininessFrontAndBack(); } - // TEXTURE / TEXTURE_0 - attr = sset.getTextureAttribute(0, osg::StateAttribute::TEXTURE ); + // TEXTURE / TEXTURE_0 + // ( and only for 2D textures right now... RO August 2002) + attr = dynamic_cast(sset.getTextureAttribute(0, osg::StateAttribute::TEXTURE )); if ( attr && ( sset.getTextureMode(0, GL_TEXTURE_2D ) & osg::StateAttribute::ON )) { - const osg::Texture &texture = (const osg::Texture &) (*attr); + const osg::Texture2D &texture = (const osg::Texture2D &) (*attr); // NOTE: If OSG failed to load the texture, we'll get a NULL right here image = texture.getImage(); @@ -2032,13 +2033,13 @@ void MyStateSet::Query( const osg::StateSet &sset ) // attribute "texture function" string ["decal"|"replace"|"modulate" // "blend"] - wrap_s = texture.getWrap( osg::Texture::WRAP_S ); - wrap_t = texture.getWrap( osg::Texture::WRAP_T ); - min_filter = texture.getFilter( osg::Texture::MIN_FILTER ); - mag_filter = texture.getFilter( osg::Texture::MAG_FILTER ); + wrap_s = texture.getWrap( osg::Texture2D::WRAP_S ); + wrap_t = texture.getWrap( osg::Texture2D::WRAP_T ); + min_filter = texture.getFilter( osg::Texture2D::MIN_FILTER ); + mag_filter = texture.getFilter( osg::Texture2D::MAG_FILTER ); if ( texture.getInternalFormatMode() != - osg::Texture::USE_IMAGE_DATA_FORMAT ) { + osg::Texture2D::USE_IMAGE_DATA_FORMAT ) { // FIXME: When we generalize this, remove the static hack static int been_here = 0; if ( !been_here ) { diff --git a/src/osgPlugins/flt/GeoSetBuilder.cpp b/src/osgPlugins/flt/GeoSetBuilder.cpp index 48ec0ca54..3fd229fe8 100644 --- a/src/osgPlugins/flt/GeoSetBuilder.cpp +++ b/src/osgPlugins/flt/GeoSetBuilder.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/osgPlugins/flt/Pool.cpp b/src/osgPlugins/flt/Pool.cpp index 76aab52c3..d23181a4f 100644 --- a/src/osgPlugins/flt/Pool.cpp +++ b/src/osgPlugins/flt/Pool.cpp @@ -5,7 +5,6 @@ #endif #include -#include #include "MaterialPaletteRecord.h" #include "OldMaterialPaletteRecord.h" diff --git a/src/osgPlugins/flt/Pool.h b/src/osgPlugins/flt/Pool.h index 4f8f22d07..1a5920b4f 100644 --- a/src/osgPlugins/flt/Pool.h +++ b/src/osgPlugins/flt/Pool.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osgPlugins/flt/ReaderWriterATTR.cpp b/src/osgPlugins/flt/ReaderWriterATTR.cpp index 7b8125743..774bf761c 100644 --- a/src/osgPlugins/flt/ReaderWriterATTR.cpp +++ b/src/osgPlugins/flt/ReaderWriterATTR.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include @@ -573,18 +573,18 @@ StateSet* Attr::createOsgStateSet() { StateSet* osgStateSet = new StateSet; TexEnv* osgTexEnv = new TexEnv; - Texture* osgTexture = new Texture; + Texture2D* osgTexture = new Texture2D; if ((wrapMode_u != WRAP_CLAMP) && ((wrapMode_u != WRAP_REPEAT))) wrapMode_u = wrapMode; if ((wrapMode_v != WRAP_CLAMP) && ((wrapMode_v != WRAP_REPEAT))) wrapMode_v = wrapMode; - if (wrapMode_u == WRAP_CLAMP) osgTexture->setWrap(Texture::WRAP_S,Texture::CLAMP); - else osgTexture->setWrap(Texture::WRAP_S,Texture::REPEAT); + if (wrapMode_u == WRAP_CLAMP) osgTexture->setWrap(Texture2D::WRAP_S,Texture2D::CLAMP); + else osgTexture->setWrap(Texture2D::WRAP_S,Texture2D::REPEAT); - if (wrapMode_v == WRAP_CLAMP) osgTexture->setWrap(Texture::WRAP_T,Texture::CLAMP); - else osgTexture->setWrap(Texture::WRAP_T,Texture::REPEAT); + if (wrapMode_v == WRAP_CLAMP) osgTexture->setWrap(Texture2D::WRAP_T,Texture2D::CLAMP); + else osgTexture->setWrap(Texture2D::WRAP_T,Texture2D::REPEAT); switch (texEnvMode) @@ -610,16 +610,16 @@ StateSet* Attr::createOsgStateSet() switch (minFilterMode) { case MIN_FILTER_MIPMAP_POINT: - osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_NEAREST); + osgTexture->setFilter(osg::Texture2D::MIN_FILTER, Texture2D::LINEAR_MIPMAP_NEAREST); break; case MIN_FILTER_MIPMAP_LINEAR: - osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::NEAREST_MIPMAP_LINEAR); + osgTexture->setFilter(osg::Texture2D::MIN_FILTER, Texture2D::NEAREST_MIPMAP_LINEAR); break; case MIN_FILTER_MIPMAP_BILINEAR: - osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_NEAREST); + osgTexture->setFilter(osg::Texture2D::MIN_FILTER, Texture2D::LINEAR_MIPMAP_NEAREST); break; case MIN_FILTER_MIPMAP_TRILINEAR: - osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); + osgTexture->setFilter(osg::Texture2D::MIN_FILTER, Texture2D::LINEAR_MIPMAP_LINEAR); break; case MIN_FILTER_POINT: case MIN_FILTER_BILINEAR: @@ -629,7 +629,7 @@ StateSet* Attr::createOsgStateSet() case MIN_FILTER_BICUBIC_GEQUAL: case MIN_FILTER_BICUBIC_LEQUAL: default: - osgTexture->setFilter(osg::Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); + osgTexture->setFilter(osg::Texture2D::MIN_FILTER, Texture2D::LINEAR_MIPMAP_LINEAR); break; } @@ -641,24 +641,24 @@ StateSet* Attr::createOsgStateSet() switch (magFilterMode) { case MAG_FILTER_POINT: - osgTexture->setFilter(osg::Texture::MAG_FILTER, Texture::NEAREST); + osgTexture->setFilter(osg::Texture2D::MAG_FILTER, Texture2D::NEAREST); break; case MAG_FILTER_BILINEAR: case MAG_FILTER_BILINEAR_GEQUAL: case MAG_FILTER_BILINEAR_LEQUAL: case MAG_FILTER_SHARPEN: - osgTexture->setFilter(osg::Texture::MAG_FILTER, Texture::LINEAR); + osgTexture->setFilter(osg::Texture2D::MAG_FILTER, Texture2D::LINEAR); break; case MAG_FILTER_BICUBIC: case MAG_FILTER_BICUBIC_GEQUAL: case MAG_FILTER_BICUBIC_LEQUAL: - osgTexture->setFilter(osg::Texture::MAG_FILTER, Texture::LINEAR); + osgTexture->setFilter(osg::Texture2D::MAG_FILTER, Texture2D::LINEAR); osgTexture->setMaxAnisotropy(2.0f); break; // case MAG_FILTER_ADD_DETAIL: // case MAG_FILTER_MODULATE_DETAIL: -// osgTexture->setFilter(osg::Texture::MAG_FILTER, Texture::LINEAR); +// osgTexture->setFilter(osg::Texture2D::MAG_FILTER, Texture2D::LINEAR); // break; } diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index af18e51d2..0ec85549c 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -511,9 +511,9 @@ void ConvertFromFLT::visitTexturePalette(osg::Group& , TexturePaletteRecord* rec { osgStateSet = new osg::StateSet; - osg::Texture* osgTexture = new osg::Texture; - osgTexture->setWrap(osg::Texture::WRAP_S,osg::Texture::REPEAT); - osgTexture->setWrap(osg::Texture::WRAP_T,osg::Texture::REPEAT); + osg::Texture2D* osgTexture = new osg::Texture2D; + osgTexture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::REPEAT); + osgTexture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::REPEAT); osgStateSet->setTextureAttributeAndModes( unit, osgTexture,osg::StateAttribute::ON); osg::TexEnv* osgTexEnv = new osg::TexEnv; @@ -521,10 +521,10 @@ void ConvertFromFLT::visitTexturePalette(osg::Group& , TexturePaletteRecord* rec osgStateSet->setTextureAttribute( unit, osgTexEnv ); } - osg::Texture *osgTexture = dynamic_cast(osgStateSet->getTextureAttribute( unit, osg::StateAttribute::TEXTURE)); + osg::Texture2D *osgTexture = dynamic_cast(osgStateSet->getTextureAttribute( unit, osg::StateAttribute::TEXTURE)); if (osgTexture == NULL) { - osgTexture = new osg::Texture; + osgTexture = new osg::Texture2D; osgStateSet->setTextureAttributeAndModes( unit, osgTexture,osg::StateAttribute::ON); } @@ -1160,7 +1160,7 @@ void ConvertFromFLT::setTexture ( FaceRecord *rec, SFace *pSFace, osg::StateSet osgStateSet->merge(*textureStateSet); // Alpha channel in texture? - osg::Texture *osgTexture = dynamic_cast(textureStateSet->getTextureAttribute( 0, osg::StateAttribute::TEXTURE)); + osg::Texture2D *osgTexture = dynamic_cast(textureStateSet->getTextureAttribute( 0, osg::StateAttribute::TEXTURE)); if (osgTexture) { osg::Image* osgImage = osgTexture->getImage(); diff --git a/src/osgPlugins/iv/osgvisitor.cpp b/src/osgPlugins/iv/osgvisitor.cpp index d2559468e..39ecb8a40 100644 --- a/src/osgPlugins/iv/osgvisitor.cpp +++ b/src/osgPlugins/iv/osgvisitor.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ class ObjectCache { typedef std::map, osg::ref_ptr > MaterialMap; - typedef std::map, ltstr> TextureMap; + typedef std::map, ltstr> TextureMap; typedef std::map, osg::ref_ptr > NodeMap; static MaterialMap materials; @@ -90,12 +90,12 @@ public: return materials[_material].get(); } - static osg::Texture* getTextura(const char* _texture) { + static osg::Texture2D* getTextura(const char* _texture) { if (textures.find(_texture) == textures.end()) { - osg::Texture *texture=new osg::Texture(); + osg::Texture2D *texture=new osg::Texture2D(); texture->setImage(osgDB::readImageFile(_texture)); - texture->setWrap(osg::Texture::WRAP_S,osg::Texture::REPEAT); - texture->setWrap(osg::Texture::WRAP_T,osg::Texture::REPEAT); + texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::REPEAT); + texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::REPEAT); osg::notify(osg::INFO) << "Loading texture " << _texture << std::endl; textures[_texture]=texture; } @@ -246,7 +246,7 @@ void OSGVisitor::makeGeode(osg::Geode *geode, osg::Geometry *geometry, bool twoS if (texture_active!=0) { AtrString *filename=(AtrString*)texture_active->getAttribute("filename"); if (filename) { - osg::Texture *texture=ObjectCache::getTextura(filename->getValue()); + osg::Texture2D *texture=ObjectCache::getTextura(filename->getValue()); state->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); } } diff --git a/src/osgPlugins/lib3ds/ReaderWriter3DS.cpp b/src/osgPlugins/lib3ds/ReaderWriter3DS.cpp index 7cd70b4a6..855bc1e62 100644 --- a/src/osgPlugins/lib3ds/ReaderWriter3DS.cpp +++ b/src/osgPlugins/lib3ds/ReaderWriter3DS.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -93,7 +93,7 @@ class ReaderWriter3DS : public osgDB::ReaderWriter protected: - osg::Texture* createTexture(Lib3dsTextureMap *texture,const char* label,bool& transparancy); + osg::Texture2D* createTexture(Lib3dsTextureMap *texture,const char* label,bool& transparancy); osg::StateSet* createStateSet(Lib3dsMaterial *materials); osg::Drawable* createDrawable(Lib3dsMesh *meshes,FaceList& faceList, Lib3dsMatrix* matrix); @@ -609,7 +609,7 @@ osg::Drawable* ReaderWriter3DS::createDrawable(Lib3dsMesh *m,FaceList& faceLis } -osg::Texture* ReaderWriter3DS::createTexture(Lib3dsTextureMap *texture,const char* label,bool& transparancy) +osg::Texture2D* ReaderWriter3DS::createTexture(Lib3dsTextureMap *texture,const char* label,bool& transparancy) { if (texture && *(texture->name)) { @@ -641,20 +641,20 @@ osg::Texture* ReaderWriter3DS::createTexture(Lib3dsTextureMap *texture,const ch return NULL; } - osg::Texture* osg_texture = new osg::Texture; + osg::Texture2D* osg_texture = new osg::Texture2D; osg_texture->setImage(osg_image); // does the texture support transparancy? transparancy = ((texture->flags)&LIB3DS_ALPHA_SOURCE)!=0; // what is the wrap mode of the texture. - osg::Texture::WrapMode wm = ((texture->flags)&LIB3DS_NO_TILE) ? - osg::Texture::CLAMP : wm=osg::Texture::REPEAT; - osg_texture->setWrap(osg::Texture::WRAP_S,wm); - osg_texture->setWrap(osg::Texture::WRAP_T,wm); - osg_texture->setWrap(osg::Texture::WRAP_R,wm); + osg::Texture2D::WrapMode wm = ((texture->flags)&LIB3DS_NO_TILE) ? + osg::Texture2D::CLAMP : wm=osg::Texture2D::REPEAT; + osg_texture->setWrap(osg::Texture2D::WRAP_S,wm); + osg_texture->setWrap(osg::Texture2D::WRAP_T,wm); + osg_texture->setWrap(osg::Texture2D::WRAP_R,wm); // bilinear. - osg_texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR_MIPMAP_NEAREST); + osg_texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR_MIPMAP_NEAREST); return osg_texture; } @@ -689,7 +689,7 @@ osg::StateSet* ReaderWriter3DS::createStateSet(Lib3dsMaterial *mat) bool decal = true; bool textureTransparancy=false; - osg::Texture* texture1_map = createTexture(&(mat->texture1_map),"texture1_map",textureTransparancy); + osg::Texture2D* texture1_map = createTexture(&(mat->texture1_map),"texture1_map",textureTransparancy); if (texture1_map) { stateset->setTextureAttributeAndModes(0,texture1_map,osg::StateAttribute::ON); diff --git a/src/osgPlugins/lwo/Lwo2.cpp b/src/osgPlugins/lwo/Lwo2.cpp index eb176f035..6187996c3 100644 --- a/src/osgPlugins/lwo/Lwo2.cpp +++ b/src/osgPlugins/lwo/Lwo2.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -655,7 +655,7 @@ Lwo2::_generate_statesets_from_surfaces() notify(DEBUG_INFO) << "\tresult - " << image << endl; if (image) { - Texture* texture = new osg::Texture; + Texture2D* texture = new osg::Texture2D; texture->setImage(image); state_set->setTextureAttributeAndModes(0, texture, StateAttribute::ON); } diff --git a/src/osgPlugins/lwo/ReaderWriterLWO.cpp b/src/osgPlugins/lwo/ReaderWriterLWO.cpp index bd5c15c48..ea7059e6b 100644 --- a/src/osgPlugins/lwo/ReaderWriterLWO.cpp +++ b/src/osgPlugins/lwo/ReaderWriterLWO.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -173,7 +173,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string // create state osg::StateSet* stateset = new osg::StateSet; - osg::Texture* texture = new osg::Texture; + osg::Texture2D* texture = new osg::Texture2D; texture->setImage(image); stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); diff --git a/src/osgPlugins/obj/ReaderWriterOBJ.cpp b/src/osgPlugins/obj/ReaderWriterOBJ.cpp index b5053ec51..7bf37955b 100644 --- a/src/osgPlugins/obj/ReaderWriterOBJ.cpp +++ b/src/osgPlugins/obj/ReaderWriterOBJ.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -130,7 +130,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil osg::Image* osg_image = osgDB::readImageFile(fileName.c_str()); if (osg_image) { - osg::Texture* osg_texture = new osg::Texture; + osg::Texture2D* osg_texture = new osg::Texture2D; osg_texture->setImage(osg_image); stateset->setTextureAttributeAndModes(0,osg_texture,osg::StateAttribute::ON); diff --git a/src/osgPlugins/osg/StateSet.cpp b/src/osgPlugins/osg/StateSet.cpp index 14b79e020..ddd1bd75e 100644 --- a/src/osgPlugins/osg/StateSet.cpp +++ b/src/osgPlugins/osg/StateSet.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/osgPlugins/pfb/ConvertFromPerformer.cpp b/src/osgPlugins/pfb/ConvertFromPerformer.cpp index 685047559..459ca5e58 100644 --- a/src/osgPlugins/pfb/ConvertFromPerformer.cpp +++ b/src/osgPlugins/pfb/ConvertFromPerformer.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -1125,19 +1125,19 @@ osg::Material* ConvertFromPerformer::visitMaterial(osg::StateSet* osgStateSet,pf } -static osg::Texture::FilterMode getTexfilter(int filter, int pftype) +static osg:::Texture2D::FilterMode getTexfilter(int filter, int pftype) { if (filter == PFTEX_MINFILTER) { if (pftype & PFTEX_LINEAR) - return osg::Texture::NEAREST_MIPMAP_LINEAR; + return osg:::Texture2D::NEAREST_MIPMAP_LINEAR; else if (pftype & PFTEX_BILINEAR) - return osg::Texture::LINEAR_MIPMAP_NEAREST; + return osg:::Texture2D::LINEAR_MIPMAP_NEAREST; else if (pftype & PFTEX_TRILINEAR) - return osg::Texture::LINEAR_MIPMAP_LINEAR; + return osg:::Texture2D::LINEAR_MIPMAP_LINEAR; - return osg::Texture::NEAREST_MIPMAP_LINEAR; + return osg:::Texture2D::NEAREST_MIPMAP_LINEAR; } else @@ -1147,22 +1147,22 @@ static osg::Texture::FilterMode getTexfilter(int filter, int pftype) // not quite sure what is supposed to be interpret the Peformer // filter modes here so will simple go with OpenGL default. - return osg::Texture::LINEAR; + return osg:::Texture2D::LINEAR; } } -osg::Texture* ConvertFromPerformer::visitTexture(osg::StateSet* osgStateSet,pfTexture* tex) +osg::Texture2D* ConvertFromPerformer::visitTexture(osg::StateSet* osgStateSet,pfTexture* tex) { if (tex==NULL) return NULL; - osg::Texture* osgTexture = dynamic_cast(getOsgObject(tex)); + osg::Texture2D* osgTexture = dynamic_cast(getOsgObject(tex)); if (osgTexture) { if (osgStateSet) osgStateSet->setTextureAttribute(0,osgTexture); return osgTexture; } - osgTexture = new osg::Texture; + osgTexture = new osg::Texture2D; registerPfObjectForOsgObject(tex, osgTexture); //_pfToOsgMap[tex] = osgTexture; @@ -1173,26 +1173,26 @@ osg::Texture* ConvertFromPerformer::visitTexture(osg::StateSet* osgStateSet,pfTe int repeat_t = tex->getRepeat(PFTEX_WRAP_T); if (repeat_r==PFTEX_CLAMP) - osgTexture->setWrap(osg::Texture::WRAP_R,osg::Texture::CLAMP); + osgTexture->setWrap(osg:::Texture2D::WRAP_R,osg:::Texture2D::CLAMP); else - osgTexture->setWrap(osg::Texture::WRAP_R,osg::Texture::REPEAT); + osgTexture->setWrap(osg:::Texture2D::WRAP_R,osg:::Texture2D::REPEAT); if (repeat_s==PFTEX_CLAMP) - osgTexture->setWrap(osg::Texture::WRAP_S,osg::Texture::CLAMP); + osgTexture->setWrap(osg:::Texture2D::WRAP_S,osg:::Texture2D::CLAMP); else - osgTexture->setWrap(osg::Texture::WRAP_S,osg::Texture::REPEAT); + osgTexture->setWrap(osg:::Texture2D::WRAP_S,osg:::Texture2D::REPEAT); if (repeat_t==PFTEX_CLAMP) - osgTexture->setWrap(osg::Texture::WRAP_T,osg::Texture::CLAMP); + osgTexture->setWrap(osg:::Texture2D::WRAP_T,osg:::Texture2D::CLAMP); else - osgTexture->setWrap(osg::Texture::WRAP_T,osg::Texture::REPEAT); + osgTexture->setWrap(osg:::Texture2D::WRAP_T,osg:::Texture2D::REPEAT); // filter #if 1 - osgTexture->setFilter(osg::Texture::MIN_FILTER, + osgTexture->setFilter(osg:::Texture2D::MIN_FILTER, getTexfilter(PFTEX_MINFILTER, tex->getFilter(PFTEX_MINFILTER))); - osgTexture->setFilter(osg::Texture::MAG_FILTER, + osgTexture->setFilter(osg:::Texture2D::MAG_FILTER, getTexfilter(PFTEX_MAGFILTER, tex->getFilter(PFTEX_MAGFILTER))); #endif diff --git a/src/osgPlugins/pfb/ConvertFromPerformer.h b/src/osgPlugins/pfb/ConvertFromPerformer.h index 91b3f1c84..026e317c9 100644 --- a/src/osgPlugins/pfb/ConvertFromPerformer.h +++ b/src/osgPlugins/pfb/ConvertFromPerformer.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include // Performer includes. @@ -50,7 +50,7 @@ class ConvertFromPerformer { osg::Drawable* visitGeoSet(osg::Geode* osgParent,pfGeoSet* geoset); osg::StateSet* visitGeoState(osg::Drawable* osgDrawble,pfGeoState* geostate); osg::Material* visitMaterial(osg::StateSet* osgStateSet,pfMaterial* front_mat,pfMaterial* back_mat); - osg::Texture* visitTexture(osg::StateSet* osgStateSet,pfTexture* tex); + osg::Texture2D* visitTexture(osg::StateSet* osgStateSet,pfTexture* tex); typedef std::map GSetPrimitiveMap; typedef std::map GSetBindingMap; diff --git a/src/osgPlugins/pfb/ConvertToPerformer.cpp b/src/osgPlugins/pfb/ConvertToPerformer.cpp index 7a8366ff7..ce467ba55 100644 --- a/src/osgPlugins/pfb/ConvertToPerformer.cpp +++ b/src/osgPlugins/pfb/ConvertToPerformer.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -509,7 +508,7 @@ pfGeoState* ConvertToPerformer::visitStateSet(osg::StateSet* stateset) case(osg::StateAttribute::INHERIT): break; } - const osg::Texture *tex = dynamic_cast(stateset->getAttribute( osg::StateAttribute::TEXTURE)); + const osg::Texture2D *tex = dynamic_cast(stateset->getAttribute( osg::StateAttribute::TEXTURE)); if( tex != NULL ) { @@ -547,7 +546,7 @@ pfMaterial* ConvertToPerformer::visitMaterial(osg::Material* material) } -pfTexture* ConvertToPerformer::visitTexture(osg::Texture* tex) +pfTexture* ConvertToPerformer::visitTexture(osg::Texture2D* tex) { if (tex==NULL) return NULL; diff --git a/src/osgPlugins/pfb/ConvertToPerformer.h b/src/osgPlugins/pfb/ConvertToPerformer.h index 12c85ca06..bf61e404c 100644 --- a/src/osgPlugins/pfb/ConvertToPerformer.h +++ b/src/osgPlugins/pfb/ConvertToPerformer.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include // Performer includes. #include @@ -48,7 +48,7 @@ class ConvertToPerformer : protected osg::NodeVisitor { pfGeoSet* visitGeoSet(osg::GeoSet* geoset); pfGeoState* visitStateSet(osg::StateSet* geostate); pfMaterial* visitMaterial(osg::Material* material); - pfTexture* visitTexture(osg::Texture* tex); + pfTexture* visitTexture(osg::Texture2D* tex); typedef std::map OsgObjectToPfObjectMap; diff --git a/src/osgPlugins/quicktime/ReaderWriterQT.cpp b/src/osgPlugins/quicktime/ReaderWriterQT.cpp index 757379a92..f2132ed53 100644 --- a/src/osgPlugins/quicktime/ReaderWriterQT.cpp +++ b/src/osgPlugins/quicktime/ReaderWriterQT.cpp @@ -2,7 +2,6 @@ #include "osg/Notify" #include -#include #include "osg/GL" diff --git a/src/osgPlugins/rgb/ReaderWriterRGB.cpp b/src/osgPlugins/rgb/ReaderWriterRGB.cpp index 870b3db04..cd28ea4cd 100644 --- a/src/osgPlugins/rgb/ReaderWriterRGB.cpp +++ b/src/osgPlugins/rgb/ReaderWriterRGB.cpp @@ -2,7 +2,6 @@ #include "osg/Notify" #include -#include #include "osg/GL" diff --git a/src/osgPlugins/txp/TrPageArchive.cpp b/src/osgPlugins/txp/TrPageArchive.cpp index b6c3da6ab..0e8bcc534 100644 --- a/src/osgPlugins/txp/TrPageArchive.cpp +++ b/src/osgPlugins/txp/TrPageArchive.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,7 +111,7 @@ void TrPageArchive::LoadMaterials() char texName[1024]; texName[0] = 0; tex->GetName(texName,1023); // Create a texture by name. - ref_ptr osg_texture = new Texture(); + ref_ptr osg_texture = new Texture2D(); // Load Texture and Create Texture State std::string filename = osgDB::getSimpleFileName(texName); @@ -138,14 +138,14 @@ void TrPageArchive::LoadMaterials() } else if( mode == trpgTexture::Local ) { - ref_ptr osg_texture = GetLocalTexture(image_helper,0, tex); + ref_ptr osg_texture = GetLocalTexture(image_helper,0, tex); osg_texture->ref(); m_textures[i] = osg_texture; // delete [] data; } else if( mode == trpgTexture::Template ) { - ref_ptr osg_texture = GetLocalTexture(image_helper,0, tex); + ref_ptr osg_texture = GetLocalTexture(image_helper,0, tex); if (osg_texture.valid()) osg_texture->ref(); m_textures[i] = osg_texture; // delete [] data; @@ -251,11 +251,11 @@ void TrPageArchive::LoadMaterials() int wrap_s, wrap_t; texEnv.GetWrap(wrap_s, wrap_t); - Texture* osg_texture = m_textures[texId].get(); + Texture2D* osg_texture = m_textures[texId].get(); if(osg_texture) { - osg_texture->setWrap(Texture::WRAP_S, wrap_s == trpgTextureEnv::Repeat ? Texture::REPEAT: Texture::CLAMP ); - osg_texture->setWrap(Texture::WRAP_T, wrap_t == trpgTextureEnv::Repeat ? Texture::REPEAT: Texture::CLAMP ); + osg_texture->setWrap(Texture2D::WRAP_S, wrap_s == trpgTextureEnv::Repeat ? Texture2D::REPEAT: Texture2D::CLAMP ); + osg_texture->setWrap(Texture2D::WRAP_T, wrap_t == trpgTextureEnv::Repeat ? Texture2D::REPEAT: Texture2D::CLAMP ); osg_state_set->setTextureAttributeAndModes(ntex,osg_texture, StateAttribute::ON); if(osg_texture->getImage()) diff --git a/src/osgPlugins/txp/TrPageArchive.h b/src/osgPlugins/txp/TrPageArchive.h index db7967bca..641ea94e5 100644 --- a/src/osgPlugins/txp/TrPageArchive.h +++ b/src/osgPlugins/txp/TrPageArchive.h @@ -77,7 +77,7 @@ namespace txp /// This class does most of the actual parsing. std::auto_ptr parse; // Texture, material, and model lists. - std::vector< osg::ref_ptr > m_textures; + std::vector< osg::ref_ptr > m_textures; std::vector< osg::ref_ptr > m_gstates; std::vector< osg::ref_ptr > m_models; std::string m_alternate_path; diff --git a/src/osgPlugins/txp/TrPageParser.cpp b/src/osgPlugins/txp/TrPageParser.cpp index 0003940cc..6dc5c426a 100644 --- a/src/osgPlugins/txp/TrPageParser.cpp +++ b/src/osgPlugins/txp/TrPageParser.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -50,9 +49,9 @@ using namespace osg; using std::vector; using std::string; -Texture* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* locmat, const trpgTexture* tex) +Texture2D* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* locmat, const trpgTexture* tex) { - Texture* osg_texture= 0L; + Texture2D* osg_texture= 0L; trpg2iPoint s; tex->GetImageSize(s); @@ -61,7 +60,7 @@ Texture* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* trpgTexture::ImageType type; tex->GetImageType(type); - Texture::InternalFormatMode internalFormat = Texture::USE_IMAGE_DATA_FORMAT; + Texture2D::InternalFormatMode internalFormat = Texture2D::USE_IMAGE_DATA_FORMAT; GLenum gltype = (GLenum)-1; switch(type) @@ -93,7 +92,7 @@ Texture* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* { gltype = GL_RGBA; } - internalFormat = Texture::USE_S3TC_DXT1_COMPRESSION; + internalFormat = Texture2D::USE_S3TC_DXT1_COMPRESSION; break; case trpgTexture::trpg_DXT3: if(depth == 3) @@ -104,7 +103,7 @@ Texture* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* { gltype = GL_RGBA; } - internalFormat = Texture::USE_S3TC_DXT3_COMPRESSION; + internalFormat = Texture2D::USE_S3TC_DXT3_COMPRESSION; break; case trpgTexture::trpg_DXT5: if(depth == 3) @@ -115,13 +114,13 @@ Texture* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* { gltype = GL_RGBA; } - internalFormat = Texture::USE_S3TC_DXT5_COMPRESSION; + internalFormat = Texture2D::USE_S3TC_DXT5_COMPRESSION; break; } if(gltype!=(GLenum)-1) { - osg_texture = new Texture(); + osg_texture = new Texture2D(); osg_texture->setInternalFormatMode(internalFormat); Image* image = new Image; @@ -683,7 +682,7 @@ void TrPageParser::LoadLocalMaterials() osg_state_set->setTextureAttribute(0,osg_texenv); - Texture* osg_texture = GetLocalTexture(image_helper,&locmat, tex); + Texture2D* osg_texture = GetLocalTexture(image_helper,&locmat, tex); if(osg_texture) { @@ -700,8 +699,8 @@ void TrPageParser::LoadLocalMaterials() int wrap_s, wrap_t; texEnv.GetWrap(wrap_s, wrap_t); - osg_texture->setWrap(Texture::WRAP_S, wrap_s == trpgTextureEnv::Repeat ? Texture::REPEAT: Texture::CLAMP ); - osg_texture->setWrap(Texture::WRAP_T, wrap_t == trpgTextureEnv::Repeat ? Texture::REPEAT: Texture::CLAMP ); + osg_texture->setWrap(Texture2D::WRAP_S, wrap_s == trpgTextureEnv::Repeat ? Texture2D::REPEAT: Texture2D::CLAMP ); + osg_texture->setWrap(Texture2D::WRAP_T, wrap_t == trpgTextureEnv::Repeat ? Texture2D::REPEAT: Texture2D::CLAMP ); } Material *osg_material = new Material; diff --git a/src/osgPlugins/txp/TrPageParser.h b/src/osgPlugins/txp/TrPageParser.h index e109ab0f0..7456e4761 100644 --- a/src/osgPlugins/txp/TrPageParser.h +++ b/src/osgPlugins/txp/TrPageParser.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,7 +92,7 @@ namespace txp std::vector >* models; }; - osg::Texture* GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* locmat, const trpgTexture* tex); + osg::Texture2D* GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMaterial* locmat, const trpgTexture* tex); //! callback functions for various scene graph elements class geomRead : public trpgr_Callback { diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index cbae059ac..27341a256 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include @@ -615,7 +615,7 @@ void SceneView::drawStage(osgUtil::RenderStage* renderStage) // context for when the object were originally created. Here we know what // context we are in so can flush the appropriate caches. osg::Drawable::flushDeletedDisplayLists(_state->getContextID()); - osg::Texture::flushDeletedTextureObjects(_state->getContextID()); + osg::TextureBase::flushDeletedTextureObjects(_state->getContextID()); RenderLeaf* previous = NULL;