From 010e56c8cc8618ac074016256793639f0919df17 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Nov 2002 16:39:05 +0000 Subject: [PATCH] Added implementation of isImageTranslucent method. --- src/osg/Image.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 931d58796..693e57d58 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -475,6 +475,58 @@ void Image::computeMipMaps() } +bool Image::isImageTranslucent() const +{ + + + if (getPixelFormat()==GL_LUMINANCE_ALPHA) + { + return true; + + + // unfinished code so commenting out right now... +// switch(type) +// { +// case(GL_BYTE): +// { +// int rowSizeInBytes = getRowSizeInBytes(); +// int imageSizeInBytes = getImageSizeInBytes(); +// +// for (int r=0;r<_r,++r) +// { +// for (int t=0;t