//----------------------------------------------------------------// void MOAIGfxDeviceStateCache::SetBlendMode ( const MOAIBlendMode& blendMode ) { if ( !this->mBlendEnabled ) { this->OnGfxStateWillChange (); zglEnable ( ZGL_PIPELINE_BLEND ); this->mBlendMode = blendMode; zglBlendMode ( this->mBlendMode.mEquation ); zglBlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); this->mBlendEnabled = true; } else if ( !this->mBlendMode.IsSame ( blendMode )) { this->OnGfxStateWillChange (); this->mBlendMode = blendMode; zglBlendMode ( this->mBlendMode.mEquation ); zglBlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); } }
//----------------------------------------------------------------// void MOAIBlendMode::Bind () { zglEnable ( ZGL_PIPELINE_BLEND ); zglBlendMode ( this->mEquation ); zglBlendFunc ( this->mSourceFactor, this->mDestFactor ); }