From 5960307703f246ec4ae3253ee7b5dc085a6adf22 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 15 Jan 2003 11:33:33 +0000 Subject: [PATCH] Patch from Joseph Steel, added missing check for the mipmap usage. --- src/osgPlugins/txp/TrPageParser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/txp/TrPageParser.cpp b/src/osgPlugins/txp/TrPageParser.cpp index 0d026fb83..f75f33ec9 100644 --- a/src/osgPlugins/txp/TrPageParser.cpp +++ b/src/osgPlugins/txp/TrPageParser.cpp @@ -127,7 +127,12 @@ Texture2D* txp::GetLocalTexture(trpgrImageHelper& image_helper, trpgLocalMateria Image* image = new Image; char* data = 0L; - int32 num_mipmaps = tex->CalcNumMipmaps(); + + + bool bMipmap; + tex->GetIsMipmap(bMipmap); + int32 num_mipmaps = bMipmap ? tex->CalcNumMipmaps() : 1; // this is currently line 130 + // osg::Image do their own mipmaps if(num_mipmaps <= 1) {