From da6993fc7705cf96393289252bc2602357867695 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 1 Sep 2004 09:00:20 +0000 Subject: [PATCH] Added support for CONSTANT_COLOR and ONE_MINUS_CONSTANT_COLOR into .osg --- src/osgPlugins/osg/BlendFunc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osgPlugins/osg/BlendFunc.cpp b/src/osgPlugins/osg/BlendFunc.cpp index 337902339..f0fda1c24 100644 --- a/src/osgPlugins/osg/BlendFunc.cpp +++ b/src/osgPlugins/osg/BlendFunc.cpp @@ -85,6 +85,8 @@ bool BlendFunc_matchModeStr(const char* str,int& mode) else if (strcmp(str,"ZERO")==0) mode = BlendFunc::ZERO; else if (strcmp(str,"CONSTANT_ALPHA")==0) mode = BlendFunc::CONSTANT_ALPHA; else if (strcmp(str,"ONE_MINUS_CONSTANT_ALPHA")==0) mode = BlendFunc::ONE_MINUS_CONSTANT_ALPHA; + else if (strcmp(str,"CONSTANT_COLOR")==0) mode = BlendFunc::CONSTANT_COLOR; + else if (strcmp(str,"ONE_MINUS_CONSTANT_COLOR")==0) mode = BlendFunc::ONE_MINUS_CONSTANT_COLOR; else return false; return true; @@ -107,6 +109,8 @@ const char* BlendFunc_getModeStr(int value) case(BlendFunc::ZERO) : return "ZERO"; case(BlendFunc::CONSTANT_ALPHA) : return "CONSTANT_ALPHA"; case(BlendFunc::ONE_MINUS_CONSTANT_ALPHA): return "ONE_MINUS_CONSTANT_ALPHA"; + case(BlendFunc::CONSTANT_COLOR) : return "CONSTANT_COLOR"; + case(BlendFunc::ONE_MINUS_CONSTANT_COLOR): return "ONE_MINUS_CONSTANT_COLOR"; } return NULL;