From aa3d887e94454b2e0cb97908160d2daf482b2ee3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Nov 2002 16:40:30 +0000 Subject: [PATCH] Added check of translucency of an image via osg::Image::isImageTranslucent(). --- src/osgPlugins/flt/flt2osg.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index f7d6255a4..a8e94a0b7 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -1155,13 +1155,8 @@ void ConvertFromFLT::setTexture ( FaceRecord *rec, SFace *pSFace, osg::StateSet if (osgTexture) { osg::Image* osgImage = osgTexture->getImage(); - switch (osgImage->getPixelFormat()) - { - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - bBlend = true; - break; - } + if (osgImage->isImageTranslucent()) bBlend = true; + } #if 0 // Started to experiment with OpenFlight texture mapping modes