From bff4728eac5483b63960b52ebc7b9a63d7b51492 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 27 Aug 2002 21:01:22 +0000 Subject: [PATCH] Commented out the #define TEXTURE_USE_DEPRECATED_API from includ/osg/Texture which forces the use of a typedef Texture2D Texture; in place of the orignal texure implementation. --- include/osg/Texture | 2 +- src/osgPlugins/osg/Texture.cpp | 22 ---------------------- src/osgPlugins/osg/Texture2D.cpp | 15 ++++++++++++++- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/include/osg/Texture b/include/osg/Texture index 6f13eeb66..8027e1696 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -4,7 +4,7 @@ // -*-c++-*- -#define TEXTURE_USE_DEPRECATED_API +//#define TEXTURE_USE_DEPRECATED_API #ifdef TEXTURE_USE_DEPRECATED_API #ifndef OSG_TEXTURE diff --git a/src/osgPlugins/osg/Texture.cpp b/src/osgPlugins/osg/Texture.cpp index 244e2f3d9..fb05a33e0 100644 --- a/src/osgPlugins/osg/Texture.cpp +++ b/src/osgPlugins/osg/Texture.cpp @@ -318,26 +318,4 @@ const char* Texture_getSubloadModeStr(Texture::SubloadMode value) } return NULL; } -#else - -#include "osg/Texture2D" - -#include "osgDB/Registry" -#include "osgDB/Input" -#include "osgDB/Output" - -using namespace osg; -using namespace osgDB; - -RegisterDotOsgWrapperProxy g_TextureProxy -( - osgNew osg::Texture2D, - "Texture", - "Object StateAttribute Texture2D TextureBase", - 0, - 0 -); - - #endif - diff --git a/src/osgPlugins/osg/Texture2D.cpp b/src/osgPlugins/osg/Texture2D.cpp index 8a7f9e346..78e90bc41 100644 --- a/src/osgPlugins/osg/Texture2D.cpp +++ b/src/osgPlugins/osg/Texture2D.cpp @@ -20,6 +20,20 @@ const char* Texture2D_getInternalFormatModeStr(Texture2D::InternalFormatMode mod bool Texture2D_matchInternalFormatStr(const char* str,int& value); const char* Texture2D_getInternalFormatStr(int value); + + +#include "osg/Texture" +#ifndef TEXTURE_USE_DEPRECATED_API +RegisterDotOsgWrapperProxy g_TextureProxy +( + osgNew osg::Texture2D, + "Texture", + "Object StateAttribute Texture2D TextureBase", + 0, + 0 +); +#endif + // register the read and write functions with the osgDB::Registry. RegisterDotOsgWrapperProxy g_Texture2DProxy ( @@ -30,7 +44,6 @@ RegisterDotOsgWrapperProxy g_Texture2DProxy &Texture2D_writeLocalData ); - bool Texture2D_readLocalData(Object& obj, Input& fr) { bool iteratorAdvanced = false;