Moves GL calls of fixed pipeline under the same condition.
This was SVN commit r23953.
This commit is contained in:
parent
4c1847d3db
commit
b664a1ae8e
@ -207,10 +207,6 @@ void SkyManager::RenderSky()
|
|||||||
|
|
||||||
glDepthMask(GL_FALSE);
|
glDepthMask(GL_FALSE);
|
||||||
|
|
||||||
pglActiveTextureARB(GL_TEXTURE0_ARB);
|
|
||||||
if (g_RenderingOptions.GetRenderPath() == RenderPath::FIXED)
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
|
||||||
|
|
||||||
CShaderProgramPtr shader;
|
CShaderProgramPtr shader;
|
||||||
CShaderTechniquePtr skytech;
|
CShaderTechniquePtr skytech;
|
||||||
|
|
||||||
@ -243,6 +239,10 @@ void SkyManager::RenderSky()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
pglActiveTextureARB(GL_TEXTURE0_ARB);
|
||||||
|
|
||||||
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
// Modify current matrix that already contains view part.
|
// Modify current matrix that already contains view part.
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
@ -317,10 +317,9 @@ void SkyManager::RenderSky()
|
|||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
|
||||||
|
|
||||||
if (g_RenderingOptions.GetRenderPath() == RenderPath::FIXED)
|
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||||
|
}
|
||||||
|
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user