From 35d134f71246c7fb295eb0b97f06a14153de1163 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 21 Sep 2006 10:01:27 +0000 Subject: [PATCH] From Farshid Lashkari, added function for querring whether a mode is a texture related mode or not. --- include/osg/StateSet | 2 ++ src/osg/StateSet.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/osg/StateSet b/include/osg/StateSet index 8310f7172..1fac5e1cc 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -486,6 +486,8 @@ class OSG_EXPORT StateSet : public Object }; +extern OSG_EXPORT bool isTextureMode(StateAttribute::GLMode mode); + } #endif diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index f7bab99e7..2de565a7e 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -73,6 +73,11 @@ static TextureGLModeSet& getTextureGLModeSet() return s_textureGLModeSet; } +bool osg::isTextureMode(StateAttribute::GLMode mode) +{ + return getTextureGLModeSet().isTextureMode(mode); +} + StateSet::StateSet() { setDataVariance(osg::StateAttribute::STATIC);