From aa61f87abe9f38940c6ee4a15e3d1ebc2564e24c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 10 May 2005 10:01:13 +0000 Subject: [PATCH] From Farshid Lashkari, bumped IVE version number to 9, and added support in Texture for _borderWidth _useHardwareMipMapGeneration _unrefImageDataAfterApply _clientStorageHint _resizeNonPowerOfTwoHint --- src/osgPlugins/ive/IveVersion.h | 4 ++-- src/osgPlugins/ive/Texture.cpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/ive/IveVersion.h b/src/osgPlugins/ive/IveVersion.h index 51c6ca30c..e15c03070 100644 --- a/src/osgPlugins/ive/IveVersion.h +++ b/src/osgPlugins/ive/IveVersion.h @@ -17,9 +17,9 @@ #define VERSION_0007 7 #define VERSION_0008 8 +#define VERSION_0009 9 - -#define VERSION VERSION_0008 +#define VERSION VERSION_0009 /* The BYTE_SEX tag is used to check the endian diff --git a/src/osgPlugins/ive/Texture.cpp b/src/osgPlugins/ive/Texture.cpp index e44e9b4e6..759ca2124 100644 --- a/src/osgPlugins/ive/Texture.cpp +++ b/src/osgPlugins/ive/Texture.cpp @@ -47,6 +47,15 @@ void Texture::write(DataOutputStream* out){ { out->writeInt(_internalFormat); } + + if ( out->getVersion() >= VERSION_0009 ) + { + out->writeInt(_borderWidth); + out->writeBool(_useHardwareMipMapGeneration); + out->writeBool(_unrefImageDataAfterApply); + out->writeBool(_clientStorageHint); + out->writeBool(_resizeNonPowerOfTwoHint); + } } void Texture::read(DataInputStream* in) @@ -83,6 +92,15 @@ void Texture::read(DataInputStream* in) _internalFormat = in->readInt(); } + if ( in->getVersion() >= VERSION_0009 ) + { + _borderWidth = in->readInt(); + _useHardwareMipMapGeneration = in->readBool(); + _unrefImageDataAfterApply = in->readBool(); + _clientStorageHint = in->readBool(); + _resizeNonPowerOfTwoHint = in->readBool(); + } + } else {