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

Method _setFog

RenderSystems/GL/src/OgreGLRenderSystem.cpp:1739–1766  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1737 }
1738 //-----------------------------------------------------------------------------
1739 void GLRenderSystem::_setFog(FogMode mode)
1740 {
1741
1742 GLint fogMode;
1743 switch (mode)
1744 {
1745 case FOG_EXP:
1746 fogMode = GL_EXP;
1747 break;
1748 case FOG_EXP2:
1749 fogMode = GL_EXP2;
1750 break;
1751 case FOG_LINEAR:
1752 fogMode = GL_LINEAR;
1753 break;
1754 default:
1755 // Give up on it
1756 mStateCacheManager->setEnabled(GL_FOG, false);
1757 mFixedFunctionParams->clearAutoConstant(18);
1758 mFixedFunctionParams->clearAutoConstant(19);
1759 return;
1760 }
1761
1762 mFixedFunctionParams->setAutoConstant(18, GpuProgramParameters::ACT_FOG_PARAMS);
1763 mFixedFunctionParams->setAutoConstant(19, GpuProgramParameters::ACT_FOG_COLOUR);
1764 mStateCacheManager->setEnabled(GL_FOG, true);
1765 glFogi(GL_FOG_MODE, fogMode);
1766 }
1767
1768 void GLRenderSystem::_setPolygonMode(PolygonMode level)
1769 {

Callers

nothing calls this directly

Calls 3

clearAutoConstantMethod · 0.80
setAutoConstantMethod · 0.80
setEnabledMethod · 0.45

Tested by

no test coverage detected