MCPcopy Create free account
hub / github.com/OGRECave/ogre / setColourBlendState

Method setColourBlendState

RenderSystems/GL/src/OgreGLRenderSystem.cpp:1713–1732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711 return GL_FUNC_ADD;
1712 }
1713 void GLRenderSystem::setColourBlendState(const ColourBlendState& state)
1714 {
1715 // record this
1716 mCurrentBlend = state;
1717
1718 if (state.blendingEnabled())
1719 {
1720 mStateCacheManager->setEnabled(GL_BLEND, true);
1721 mStateCacheManager->setBlendFunc(
1722 getBlendMode(state.sourceFactor), getBlendMode(state.destFactor),
1723 getBlendMode(state.sourceFactorAlpha), getBlendMode(state.destFactorAlpha));
1724 }
1725 else
1726 {
1727 mStateCacheManager->setEnabled(GL_BLEND, false);
1728 }
1729
1730 mStateCacheManager->setBlendEquation(getBlendOp(state.operation), getBlendOp(state.alphaOperation));
1731 mStateCacheManager->setColourMask(state.writeR, state.writeG, state.writeB, state.writeA);
1732 }
1733 //-----------------------------------------------------------------------------
1734 void GLRenderSystem::setLightingEnabled(bool enabled)
1735 {

Callers 2

_setPassMethod · 0.45

Calls 6

getBlendModeFunction · 0.85
getBlendOpFunction · 0.70
setEnabledMethod · 0.45
setBlendFuncMethod · 0.45
setBlendEquationMethod · 0.45
setColourMaskMethod · 0.45

Tested by

no test coverage detected