- Timestamp:
- 06/26/06 09:33:12 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OGRE/trunk/ogre_changes/Ogre1.2/OgreMain/src/OgrePass.cpp
r923 r1053 43 43 #ifdef GAMETOOLS_ILLUMINATION_MODULE 44 44 mActive = true; 45 46 mSeparateAlpha = false; 47 mAlphaSourceBlendFactor = SBF_ONE; 48 mAlphaDestBlendFactor = SBF_ZERO; 49 mBlendOperation = SBOP_ADD; 50 mAlphaBlendOperation = SBOP_ADD; 45 51 #endif 46 52 // Default to white ambient & diffuse, no specular / emissive … … 107 113 #ifdef GAMETOOLS_ILLUMINATION_MODULE 108 114 mActive = true; 115 116 mSeparateAlpha = false; 117 mAlphaSourceBlendFactor = SBF_ONE; 118 mAlphaDestBlendFactor = SBF_ZERO; 119 mBlendOperation = SBOP_ADD; 120 mAlphaBlendOperation = SBOP_ADD; 109 121 #endif 110 122 *this = oth; … … 124 136 #ifdef GAMETOOLS_ILLUMINATION_MODULE 125 137 mActive = oth.mActive; 138 mSeparateAlpha = oth.mSeparateAlpha; 139 mAlphaSourceBlendFactor = oth.mAlphaSourceBlendFactor; 140 mAlphaDestBlendFactor = oth.mAlphaDestBlendFactor; 141 mBlendOperation = oth.mBlendOperation; 142 mAlphaBlendOperation = oth.mAlphaBlendOperation; 126 143 127 144 for(int i = 0; i < oth.illumTechniques.size(); i++ ) … … 633 650 mDestBlendFactor = destFactor; 634 651 } 652 653 #ifdef GAMETOOLS_ILLUMINATION_MODULE 654 void Pass::setAlphaSceneBlending(SceneBlendType sbt) 655 { 656 // Turn predefined type into blending factors 657 switch (sbt) 658 { 659 case SBT_TRANSPARENT_ALPHA: 660 setAlphaSceneBlending(SBF_SOURCE_ALPHA, SBF_ONE_MINUS_SOURCE_ALPHA); 661 break; 662 case SBT_TRANSPARENT_COLOUR: 663 setAlphaSceneBlending(SBF_SOURCE_COLOUR, SBF_ONE_MINUS_SOURCE_COLOUR); 664 break; 665 case SBT_MODULATE: 666 setAlphaSceneBlending(SBF_DEST_COLOUR, SBF_ZERO); 667 break; 668 case SBT_ADD: 669 setAlphaSceneBlending(SBF_ONE, SBF_ONE); 670 break; 671 case SBT_REPLACE: 672 setAlphaSceneBlending(SBF_ONE, SBF_ZERO); 673 break; 674 // TODO: more 675 } 676 677 } 678 //----------------------------------------------------------------------- 679 void Pass::setAlphaSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor) 680 { 681 mAlphaSourceBlendFactor = sourceFactor; 682 mAlphaDestBlendFactor = destFactor; 683 } 684 #endif 685 635 686 //----------------------------------------------------------------------- 636 687 SceneBlendFactor Pass::getSourceBlendFactor(void) const
Note: See TracChangeset
for help on using the changeset viewer.