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

Method _setDepthBias

RenderSystems/GL/src/OgreGLRenderSystem.cpp:1683–1694  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1681 }
1682 //-----------------------------------------------------------------------------
1683 void GLRenderSystem::_setDepthBias(float constantBias, float slopeScaleBias)
1684 {
1685 bool enable = constantBias != 0 || slopeScaleBias != 0;
1686 mStateCacheManager->setEnabled(GL_POLYGON_OFFSET_FILL, enable);
1687 mStateCacheManager->setEnabled(GL_POLYGON_OFFSET_POINT, enable);
1688 mStateCacheManager->setEnabled(GL_POLYGON_OFFSET_LINE, enable);
1689
1690 if (enable)
1691 {
1692 glPolygonOffset(-slopeScaleBias, -constantBias);
1693 }
1694 }
1695 //-----------------------------------------------------------------------------
1696 static GLenum getBlendOp(SceneBlendOperation op)
1697 {

Callers 2

_setPassMethod · 0.45
renderSingleObjectMethod · 0.45

Calls 1

setEnabledMethod · 0.45

Tested by

no test coverage detected