OSG::BlendChunk Class Reference

State chunk to wrap pixel combination functions. See PageSystemBlendChunk for a description. More...

#include <OSGBlendChunk.h>

Inheritance diagram for OSG::BlendChunk:

OSG::BlendChunkBase OSG::StateChunk OSG::StateChunkBase OSG::FieldContainerAttachment OSG::FieldContainer OSG::ReflexiveContainer List of all members.

Type definitions



 OSG_GEN_INTERNALPTR (FieldContainer)
 OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks)
 OSG_RC_LAST_FIELD_DECL (ChangedCallbacks)
static const bool isNodeCore = false

Public Types

enum  {
  SrcFactorFieldId = Inherited::NextFieldId, DestFactorFieldId = SrcFactorFieldId + 1, EquationFieldId = DestFactorFieldId + 1, ColorFieldId = EquationFieldId + 1,
  AlphaFuncFieldId = ColorFieldId + 1, AlphaValueFieldId = AlphaFuncFieldId + 1, AlphaSrcFactorFieldId = AlphaValueFieldId + 1, AlphaDestFactorFieldId = AlphaSrcFactorFieldId + 1,
  NextFieldId = AlphaDestFactorFieldId + 1
}
typedef StateChunk ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
enum  { IgnoreFieldId = Inherited::NextFieldId, NextFieldId = IgnoreFieldId + 1 }
Type definitions


typedef Field *(ReflexiveContainer::*) FieldEditMethod (void)
typedef const Field *(ReflexiveContainer::*) FieldGetMethod (void) const

Public Member Functions

 OSG_GEN_INTERNALPTR (BlendChunk)
 OSG_GEN_INTERNALPTR (StateChunk)
Chunk Class Access


virtual const StateChunkClassgetClass (void) const
Sync


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector details)
Output


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
State Commands


virtual void activate (DrawEnv *pEnv, UInt32 index=0)
virtual void changeFrom (DrawEnv *pEnv, StateChunk *old, UInt32 index=0)
virtual void deactivate (DrawEnv *pEnv, UInt32 index=0)
virtual bool isTransparent (void) const
Comparison


virtual Real32 switchCost (StateChunk *chunk)
virtual bool operator< (const StateChunk &other) const
virtual bool operator== (const StateChunk &other) const
virtual bool operator!= (const StateChunk &other) const
dcast


 OSG_GEN_INTERNALPTR (FieldContainerAttachment)
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


SFGLenum * editSFSrcFactor (void)
const SFGLenum * getSFSrcFactor (void) const
SFGLenum * editSFDestFactor (void)
const SFGLenum * getSFDestFactor (void) const
SFGLenum * editSFEquation (void)
const SFGLenum * getSFEquation (void) const
SFColor4f * editSFColor (void)
const SFColor4f * getSFColor (void) const
SFGLenum * editSFAlphaFunc (void)
const SFGLenum * getSFAlphaFunc (void) const
SFReal32 * editSFAlphaValue (void)
const SFReal32 * getSFAlphaValue (void) const
SFGLenum * editSFAlphaSrcFactor (void)
const SFGLenum * getSFAlphaSrcFactor (void) const
SFGLenum * editSFAlphaDestFactor (void)
const SFGLenum * getSFAlphaDestFactor (void) const
GLenum & editSrcFactor (void)
 Get the value of the BlendChunk::_sfSrcFactor field.
const GLenum & getSrcFactor (void) const
 Get the value of the BlendChunk::_sfSrcFactor field.
GLenum & editDestFactor (void)
 Get the value of the BlendChunk::_sfDestFactor field.
const GLenum & getDestFactor (void) const
 Get the value of the BlendChunk::_sfDestFactor field.
GLenum & editEquation (void)
 Get the value of the BlendChunk::_sfEquation field.
const GLenum & getEquation (void) const
 Get the value of the BlendChunk::_sfEquation field.
Color4feditColor (void)
 Get the value of the BlendChunk::_sfColor field.
const Color4fgetColor (void) const
 Get the value of the BlendChunk::_sfColor field.
GLenum & editAlphaFunc (void)
 Get the value of the BlendChunk::_sfAlphaFunc field.
const GLenum & getAlphaFunc (void) const
 Get the value of the BlendChunk::_sfAlphaFunc field.
Real32 & editAlphaValue (void)
 Get the value of the BlendChunk::_sfAlphaValue field.
const Real32 & getAlphaValue (void) const
 Get the value of the BlendChunk::_sfAlphaValue field.
GLenum & editAlphaSrcFactor (void)
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
const GLenum & getAlphaSrcFactor (void) const
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
GLenum & editAlphaDestFactor (void)
 Get the value of the BlendChunk::_sfAlphaDestFactor field.
const GLenum & getAlphaDestFactor (void) const
 Get the value of the BlendChunk::_sfAlphaDestFactor field.
Field Set


void setSrcFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfSrcFactor field.
void setDestFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfDestFactor field.
void setEquation (const GLenum &value)
 Set the value of the BlendChunk::_sfEquation field.
void setColor (const Color4f &value)
 Set the value of the BlendChunk::_sfColor field.
void setAlphaFunc (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaFunc field.
void setAlphaValue (const Real32 &value)
 Set the value of the BlendChunk::_sfAlphaValue field.
void setAlphaSrcFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaSrcFactor field.
void setAlphaDestFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaDestFactor field.
Binary Access


virtual UInt32 getBinSize (ConstFieldMaskArg whichField)
virtual void copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
Copy


virtual FieldContainerPtr shallowCopy (void) const
Chunk Class Access


UInt32 getClassId (void) const
Chunk Id


virtual UInt16 getChunkId (void)
State


virtual void update (DrawEnv *pEnv)
Field Get


SFBool * editSFIgnore (void)
const SFBool * getSFIgnore (void) const
bool & editIgnore (void)
 Get the value of the StateChunk::_sfIgnore field.
const bool & getIgnore (void) const
 Get the value of the StateChunk::_sfIgnore field.
Field Set


void setIgnore (const bool &value)
 Set the value of the StateChunk::_sfIgnore field.
Constructors


 OSG_RC_FIRST_FIELD_DECL (Parents)
 OSG_RC_FIELD_DECL (Internal, Parents)
 OSG_RC_LAST_FIELD_DECL (Internal)
Get


SFBool & editInternal (void)
const SFBool & getInternal (void) const
SFBool * editSFInternal (void)
const SFBool * getSFInternal (void) const
Set


void setInternal (bool bVal)
your_category


void addParent (FieldContainerPtrConst parent, const UInt16 uiStoredInFieldId=InvalidParentEPos)
void subParent (FieldContainerPtrConst parent)
Container Access


FieldContainerPtr getParent (UInt32 uiIdx)
Set


void callChangedFunctors (ConstFieldMaskArg whichField)
Container Access


UInt32 addChangedFunctor (ChangedFunctor func, std::string createSymbol)
template<class FunctorT>
void subChangedFunctor (FunctorT func)
void subChangedFunctor (UInt32 uiId)
void clearChangedFunctors (void)
Field Flags


const FieldFlagsgetFieldFlags (void)
Helper


OSG_SYSTEM_DLLMAPPING void addReference (void)
OSG_SYSTEM_DLLMAPPING void subReference (void)
OSG_SYSTEM_DLLMAPPING void subReferenceLocalVar (void)
OSG_SYSTEM_DLLMAPPING Int32 getRefCount (void) const
Comparison


virtual OSG_SYSTEM_DLLMAPPING
void 
invalidateVolume (void)
dcast


OSG_SYSTEM_DLLMAPPING UInt32 getTypeId (void) const
OSG_SYSTEM_DLLMAPPING UInt16 getGroupId (void) const
OSG_SYSTEM_DLLMAPPING const
Char8 * 
getTypeName (void) const
Get Field


OSG_SYSTEM_DLLMAPPING UInt32 getNumFields (void) const
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (const Char8 *fieldName)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (UInt32 fieldId) const
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (const Char8 *fieldName) const
Get Field Description


OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (const Char8 *fieldName)
Comparison


OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr invalidEditField (void)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr invalidGetField (void) const

Static Public Member Functions

Static Chunk Class Access


static UInt32 getStaticClassId (void)
static const StateChunkClassgetStaticClass (void)
Class Get


static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
static UInt16 getClassGroupId (void)
 access the type of the class
Construction


static BlendChunkPtr create (void)
 create a new instance of the class
static BlendChunkPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Public Attributes

General Fieldcontainer Declaration


 OSG_ABSTR_FIELD_CONTAINER_DECL

Static Public Attributes

static const OSG::BitVector SrcFactorFieldMask
static const OSG::BitVector DestFactorFieldMask
static const OSG::BitVector EquationFieldMask
static const OSG::BitVector ColorFieldMask
static const OSG::BitVector AlphaFuncFieldMask
static const OSG::BitVector AlphaValueFieldMask
static const OSG::BitVector AlphaSrcFactorFieldMask
static const OSG::BitVector AlphaDestFactorFieldMask
static const OSG::BitVector NextFieldMask
static const OSG::BitVector IgnoreFieldMask

Protected Types

typedef FieldContainerAttachment Self
typedef MFParentFieldContainerPtr ParentField

Protected Member Functions

Constructors


 BlendChunk (void)
 BlendChunk (const BlendChunk &source)
Destructors


virtual ~BlendChunk (void)
Generic Field Access


GetFieldHandlePtr getHandleSrcFactor (void) const
EditFieldHandlePtr editHandleSrcFactor (void)
GetFieldHandlePtr getHandleDestFactor (void) const
EditFieldHandlePtr editHandleDestFactor (void)
GetFieldHandlePtr getHandleEquation (void) const
EditFieldHandlePtr editHandleEquation (void)
GetFieldHandlePtr getHandleColor (void) const
EditFieldHandlePtr editHandleColor (void)
GetFieldHandlePtr getHandleAlphaFunc (void) const
EditFieldHandlePtr editHandleAlphaFunc (void)
GetFieldHandlePtr getHandleAlphaValue (void) const
EditFieldHandlePtr editHandleAlphaValue (void)
GetFieldHandlePtr getHandleAlphaSrcFactor (void) const
EditFieldHandlePtr editHandleAlphaSrcFactor (void)
GetFieldHandlePtr getHandleAlphaDestFactor (void) const
EditFieldHandlePtr editHandleAlphaDestFactor (void)
Sync


virtual void resolveLinks (void)
Generic Field Access


GetFieldHandlePtr getHandleIgnore (void) const
EditFieldHandlePtr editHandleIgnore (void)
Changed


const MFParentFieldContainerPtr & getParents (void) const
const MFParentFieldContainerPtr * getMFParents (void) const
MT Destruction


EditFieldHandlePtr editInternalHandler (void)
GetFieldHandlePtr getInternalHandler (void) const
GetFieldHandlePtr getHandleParents (void) const
Edit


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroy (UInt32 uiContainerId)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
MT Construction


virtual OSG_SYSTEM_DLLMAPPING
bool 
deregister (UInt32 uiContainerId)
MT Construction


OSG_SYSTEM_DLLMAPPING void registerChangedContainer (void)
virtual OSG_SYSTEM_DLLMAPPING
void 
registerChangedContainerV (void)
Local Edit


void editSField (ConstFieldMaskArg whichField)
template<class FieldT>
void editMField (ConstFieldMaskArg whichField, FieldT &oField)
MT Destruction


void execEndEdit (ConstFieldMaskArg whichField)
void clearChangeEntry (ContainerChangeEntry *pRef)
Edit


OSG_SYSTEM_DLLMAPPING void setId (UInt32 uiContainerId)
OSG_SYSTEM_DLLMAPPING UInt32 getId (void) const

Static Protected Member Functions

static void classDescInserter (TypeObject &oType)
static Char8 * getClassname (void)
Init


static void initMethod (InitPhase ePhase)
Fields


static void classDescInserter (TypeObject &oType)
Fields


static void classDescInserter (TypeObject &oType)
MT Construction


template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result, const ObjectT *prototypeP)
template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result)

Protected Attributes

Fields


SFGLenum _sfSrcFactor
SFGLenum _sfDestFactor
SFGLenum _sfEquation
SFColor4f _sfColor
SFGLenum _sfAlphaFunc
SFReal32 _sfAlphaValue
SFGLenum _sfAlphaSrcFactor
SFGLenum _sfAlphaDestFactor
Fields


SFBool _sfIgnore
Fields


MFParentFieldContainerPtr _mfParents
SFBool _sfInternal
Type information


FieldFlags_pFieldFlags
MFChangedFunctorCallback _mfChangedFunctors
Int32 _iRefCount
Member


BitVector _bvChanged
ContainerChangeEntry_pContainerChanges
UInt32 _uiContainerId

Static Protected Attributes

static TypeObject _type

Private Types

typedef BlendChunkBase Inherited

Private Member Functions

void operator= (const BlendChunk &source)

Static Private Attributes

static StateChunkClass _class
OpenGL Extension Handling


static UInt32 _extBlend = Window::invalidExtensionID
static UInt32 _extImaging = Window::invalidExtensionID
static UInt32 _extBlendSubtract = Window::invalidExtensionID
static UInt32 _extBlendMinMax = Window::invalidExtensionID
static UInt32 _extBlendLogicOp = Window::invalidExtensionID
static UInt32 _extBlendFuncSeparate = Window::invalidExtensionID
static UInt32 _funcBlendColor = Window::invalidFunctionID
static UInt32 _funcBlendEquation = Window::invalidFunctionID
static UInt32 _funcBlendEquationExt = Window::invalidFunctionID
static UInt32 _funcBlendFuncSeparateExt = Window::invalidFunctionID

Friends

class FieldContainer
class BlendChunkBase

Detailed Description

See PageSystemBlendChunk for a description.

The blending chunk handles OpenGL blending, i.e. the definition how incoming pixel are combined with the pixel already in the frame buffer.

This chunk wraps glBlendFunc() (OSG::BlendChunk::_sfSrcFactor, OSG::BlendChunk::_sfDestFactor), glBlendEquation() or glBlendEquationEXT() (whichever is supported) (OSG::BlendChunk::_sfEquation), glBlendColor() (OSG::BlendChunk::_sfColor) and glAlphaFunc() (OSG::BlendChunk::_sfAlphaFunc, OSG::BlendChunk::_sfAlphaValue) including glEnable(GL_ALPHA_TEST).

Definition at line 53 of file OSGBlendChunk.h.


Member Typedef Documentation

Reimplemented from OSG::BlendChunkBase.

Definition at line 151 of file OSGBlendChunk.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 90 of file OSGBlendChunkBase.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 92 of file OSGBlendChunkBase.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 93 of file OSGBlendChunkBase.h.

typedef MFParentFieldContainerPtr OSG::FieldContainerAttachment::ParentField [protected, inherited]

Definition at line 169 of file OSGFieldContainerAttachment.h.

typedef Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldEditMethod(void) [inherited]

Definition at line 79 of file OSGReflexiveContainer.h.

typedef const Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldGetMethod(void) const [inherited]

Definition at line 81 of file OSGReflexiveContainer.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
SrcFactorFieldId 
DestFactorFieldId 
EquationFieldId 
ColorFieldId 
AlphaFuncFieldId 
AlphaValueFieldId 
AlphaSrcFactorFieldId 
AlphaDestFactorFieldId 
NextFieldId 

Definition at line 101 of file OSGBlendChunkBase.h.

00102     {
00103         SrcFactorFieldId = Inherited::NextFieldId,
00104         DestFactorFieldId = SrcFactorFieldId + 1,
00105         EquationFieldId = DestFactorFieldId + 1,
00106         ColorFieldId = EquationFieldId + 1,
00107         AlphaFuncFieldId = ColorFieldId + 1,
00108         AlphaValueFieldId = AlphaFuncFieldId + 1,
00109         AlphaSrcFactorFieldId = AlphaValueFieldId + 1,
00110         AlphaDestFactorFieldId = AlphaSrcFactorFieldId + 1,
00111         NextFieldId = AlphaDestFactorFieldId + 1
00112     };

anonymous enum [inherited]

Enumerator:
IgnoreFieldId 
NextFieldId 

Definition at line 94 of file OSGStateChunkBase.h.

00095     {
00096         IgnoreFieldId = Inherited::NextFieldId,
00097         NextFieldId = IgnoreFieldId + 1
00098     };


Constructor & Destructor Documentation

BlendChunk::BlendChunk ( void   )  [protected]

Definition at line 130 of file OSGBlendChunk.cpp.

00130                            :
00131     Inherited()
00132 {
00133 }

BlendChunk::BlendChunk ( const BlendChunk source  )  [protected]

Definition at line 135 of file OSGBlendChunk.cpp.

00135                                                :
00136     Inherited(source)
00137 {
00138 }

BlendChunk::~BlendChunk ( void   )  [protected, virtual]

Definition at line 140 of file OSGBlendChunk.cpp.

00141 {
00142 }


Member Function Documentation

const StateChunkClass * BlendChunk::getClass ( void   )  const [virtual]

Reimplemented from OSG::StateChunk.

Definition at line 146 of file OSGBlendChunk.cpp.

References _class.

00147 {
00148     return &_class;
00149 }

UInt32 OSG::BlendChunk::getStaticClassId ( void   )  [inline, static]

Reimplemented from OSG::StateChunk.

Definition at line 46 of file OSGBlendChunk.inl.

References OSG::StateChunkClass::getId(), and getStaticClass().

00047 {
00048     return getStaticClass()->getId();
00049 }

const StateChunkClass * OSG::BlendChunk::getStaticClass ( void   )  [inline, static]

Reimplemented from OSG::StateChunk.

Definition at line 40 of file OSGBlendChunk.inl.

References _class.

Referenced by getStaticClassId().

00041 {
00042     return &BlendChunk::_class;
00043 }

void BlendChunk::changed ( ConstFieldMaskArg  whichField,
UInt32  origin,
BitVector  details 
) [virtual]

Reimplemented from OSG::StateChunk.

Definition at line 153 of file OSGBlendChunk.cpp.

References OSG::FieldContainer::changed().

00156 {
00157     Inherited::changed(whichField, origin, details);
00158 }

virtual void OSG::BlendChunk::dump ( UInt32  uiIndent = 0,
const BitVector  bvFlags = 0 
) const [virtual]

Reimplemented from OSG::StateChunk.

void BlendChunk::activate ( DrawEnv pEnv,
UInt32  index = 0 
) [virtual]

Implements OSG::StateChunk.

Definition at line 184 of file OSGBlendChunk.cpp.

References _extBlend, _extBlendFuncSeparate, _extBlendLogicOp, _extBlendMinMax, _extBlendSubtract, _extImaging, _funcBlendColor, _funcBlendEquation, _funcBlendEquationExt, _funcBlendFuncSeparateExt, OSG::BlendChunkBase::_sfAlphaDestFactor, OSG::BlendChunkBase::_sfAlphaFunc, OSG::BlendChunkBase::_sfAlphaSrcFactor, OSG::BlendChunkBase::_sfAlphaValue, OSG::BlendChunkBase::_sfColor, OSG::BlendChunkBase::_sfDestFactor, OSG::BlendChunkBase::_sfEquation, OSG::BlendChunkBase::_sfSrcFactor, FWARNING, OSG::Window::getFunction(), OSG::DrawEnv::getWindow(), GL_CONSTANT_COLOR_EXT, GL_ONE_MINUS_CONSTANT_ALPHA_EXT, OSG::Window::hasExtension(), OSG_APIENTRY, and OSG_GL_UNUSED.

00185 {
00186     GLenum src   = _sfSrcFactor.getValue();
00187     GLenum dest  = _sfDestFactor.getValue();
00188     GLenum asrc  = _sfAlphaSrcFactor.getValue();
00189     GLenum adest = _sfAlphaDestFactor.getValue();
00190 
00191     if((src   != GL_ONE        || dest  != GL_ZERO) ||
00192        (asrc  != OSG_GL_UNUSED && asrc  != GL_ONE ) || 
00193        (adest != OSG_GL_UNUSED && adest != GL_ZERO)  )
00194     {
00195         if(asrc != OSG_GL_UNUSED || adest != OSG_GL_UNUSED)
00196         {
00197             if(asrc == OSG_GL_UNUSED || adest == OSG_GL_UNUSED)
00198             {
00199                 FWARNING(("BlendChunk::activate: only one of alpha src and"
00200                           " alpha dest is set. Ignored.\n"));
00201                 
00202                 glBlendFunc(src, dest);
00203             }
00204             else if(pEnv->getWindow()->hasExtension(_extBlendFuncSeparate))
00205             {
00206                 // get "glBlendFuncSeparate" function pointer
00207                 void (OSG_APIENTRY *blendfuncsep)(GLenum,
00208                                                   GLenum,
00209                                                   GLenum,
00210                                                   GLenum) =
00211                     
00212                     (void (OSG_APIENTRY*)(GLenum,
00213                                           GLenum,
00214                                           GLenum,
00215                                           GLenum))  
00216                     pEnv->getWindow()->getFunction(
00217                         _funcBlendFuncSeparateExt);
00218 
00219                 blendfuncsep(src, dest, asrc, adest);
00220             }
00221             else
00222             {
00223                 FWARNING(("BlendChunk::activate: Window %p doesn't "
00224                           "support EXT_blend_func_separate, ignored.\n"));
00225 
00226                 glBlendFunc(src, dest);
00227             }
00228         }
00229         else
00230         {
00231             glBlendFunc(src, dest);
00232         }
00233 
00234         // This is not nice, but efficient
00235         // As the OpenGL constants are fixed it should be safe
00236         if((src  >= GL_CONSTANT_COLOR_EXT && 
00237             src  <= GL_ONE_MINUS_CONSTANT_ALPHA_EXT ) ||
00238            (dest >= GL_CONSTANT_COLOR_EXT && 
00239             dest <= GL_ONE_MINUS_CONSTANT_ALPHA_EXT ) ||
00240            (asrc  >= GL_CONSTANT_COLOR_EXT && 
00241             asrc  <= GL_ONE_MINUS_CONSTANT_ALPHA_EXT) ||
00242            (adest >= GL_CONSTANT_COLOR_EXT && 
00243             adest <= GL_ONE_MINUS_CONSTANT_ALPHA_EXT) )
00244         {
00245             if(pEnv->getWindow()->hasExtension(_extBlend))
00246             {
00247                 // get "glBlendColorEXT" function pointer
00248                 void (OSG_APIENTRY*blendcolor)(GLclampf red,
00249                                                GLclampf green,
00250                                                GLclampf blue,
00251                                                GLclampf alpha ) =
00252                     (void (OSG_APIENTRY*)(GLclampf red,
00253                                           GLclampf green,
00254                                           GLclampf blue,
00255                                           GLclampf alpha))
00256                     pEnv->getWindow()->