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:
@@ -30,7 +30,7 @@ uniform int texture_index_in;
|
|||||||
ATTRIBUTE vec3 position;
|
ATTRIBUTE vec3 position;
|
||||||
|
|
||||||
VARYING vec3 position_out;
|
VARYING vec3 position_out;
|
||||||
VARYING int texture_index_out;
|
VARYING_FLAT int texture_index_out;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
|
|||||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||||
LLGLDisable clip(GL_CLIP_PLANE0);
|
LLGLDisable clip(GL_CLIP_PLANE0);
|
||||||
|
|
||||||
gGL.setColorMask(true, false);
|
gGL.setColorMask(true, false); //Just in case.
|
||||||
|
|
||||||
LLGLSquashToFarClip far_clip(glh_get_current_projection());
|
LLGLSquashToFarClip far_clip(glh_get_current_projection());
|
||||||
|
|
||||||
@@ -355,8 +355,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
|
|||||||
|
|
||||||
renderSkyClouds(camHeightLocal);
|
renderSkyClouds(camHeightLocal);
|
||||||
|
|
||||||
gGL.setColorMask(true, true);
|
|
||||||
|
|
||||||
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -377,7 +375,7 @@ void LLDrawPoolWLSky::render(S32 pass)
|
|||||||
|
|
||||||
LLGLSquashToFarClip far_clip(glh_get_current_projection());
|
LLGLSquashToFarClip far_clip(glh_get_current_projection());
|
||||||
|
|
||||||
gGL.setColorMask(true, false);
|
gGL.setColorMask(true, false); //Just in case.
|
||||||
|
|
||||||
renderSkyHaze(camHeightLocal);
|
renderSkyHaze(camHeightLocal);
|
||||||
|
|
||||||
@@ -406,8 +404,6 @@ void LLDrawPoolWLSky::render(S32 pass)
|
|||||||
renderSkyClouds(camHeightLocal);
|
renderSkyClouds(camHeightLocal);
|
||||||
|
|
||||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||||
|
|
||||||
gGL.setColorMask(true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolWLSky::prerender()
|
void LLDrawPoolWLSky::prerender()
|
||||||
|
|||||||
@@ -470,6 +470,12 @@ void LLViewerShaderMgr::setShaders()
|
|||||||
if (loaded)
|
if (loaded)
|
||||||
{
|
{
|
||||||
loaded = loadTransformShaders();
|
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)
|
if (loaded)
|
||||||
|
|||||||
Reference in New Issue
Block a user