OSX was choking on transformfeedback shaders. Make failure to load such shaders non-critical to the shader loading process. Also clean up glColorMask state properly in wlsky.

This commit is contained in:
Shyotl
2012-12-24 17:55:05 -06:00
parent dd15b9234f
commit 5ada2d4b6f
3 changed files with 9 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ uniform int texture_index_in;
ATTRIBUTE vec3 position;
VARYING vec3 position_out;
VARYING int texture_index_out;
VARYING_FLAT int texture_index_out;
void main()
{

View File

@@ -327,7 +327,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable clip(GL_CLIP_PLANE0);
gGL.setColorMask(true, false);
gGL.setColorMask(true, false); //Just in case.
LLGLSquashToFarClip far_clip(glh_get_current_projection());
@@ -355,8 +355,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
renderSkyClouds(camHeightLocal);
gGL.setColorMask(true, true);
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -377,7 +375,7 @@ void LLDrawPoolWLSky::render(S32 pass)
LLGLSquashToFarClip far_clip(glh_get_current_projection());
gGL.setColorMask(true, false);
gGL.setColorMask(true, false); //Just in case.
renderSkyHaze(camHeightLocal);
@@ -406,8 +404,6 @@ void LLDrawPoolWLSky::render(S32 pass)
renderSkyClouds(camHeightLocal);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.setColorMask(true, true);
}
void LLDrawPoolWLSky::prerender()

View File

@@ -470,6 +470,12 @@ void LLViewerShaderMgr::setShaders()
if (loaded)
{
loaded = loadTransformShaders();
if(!loaded) //Failed to load. Just wipe all transformfeedback shaders and continue like nothing happened.
{
mVertexShaderLevel[SHADER_TRANSFORM] = 0;
unloadShaderClass(SHADER_TRANSFORM);
loaded = true;
}
}
if (loaded)