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

Method _setAlphaRejectSettings

RenderSystems/GL/src/OgreGLRenderSystem.cpp:1586–1602  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1584 }
1585 //-----------------------------------------------------------------------------
1586 void GLRenderSystem::_setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverage)
1587 {
1588 bool enable = func != CMPF_ALWAYS_PASS;
1589
1590 mStateCacheManager->setEnabled(GL_ALPHA_TEST, enable);
1591
1592 if(enable)
1593 {
1594 glAlphaFunc(convertCompareFunction(func), value / 255.0f);
1595 }
1596
1597 if (getCapabilities()->hasCapability(RSC_ALPHA_TO_COVERAGE))
1598 {
1599 mStateCacheManager->setEnabled(GL_SAMPLE_ALPHA_TO_COVERAGE, alphaToCoverage && enable);
1600 }
1601
1602 }
1603 //-----------------------------------------------------------------------------
1604 void GLRenderSystem::_setViewport(Viewport *vp)
1605 {

Callers 2

_setPassMethod · 0.45

Calls 2

getCapabilitiesFunction · 0.85
setEnabledMethod · 0.45

Tested by

no test coverage detected