summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp14
-rw-r--r--indra/newview/lldrawpoolterrain.cpp6
2 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 5e4d5319ec..ad7e3ad593 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -295,16 +295,24 @@ void LLDrawPoolAlpha::render(S32 pass)
if (sShowDebugAlpha)
{
- if(gPipeline.canUseWindLightShaders())
+ BOOL shaders = gPipeline.canUseVertexShaders();
+ if(shaders)
{
- LLGLSLShader::bindNoShader();
+ gObjectFullbrightNonIndexedProgram.bind();
+ }
+ else
+ {
+ gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
- gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
glColor4f(1,0,0,1);
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0);
+ if(shaders)
+ {
+ gObjectFullbrightNonIndexedProgram.unbind();
+ }
}
}
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 84eeace9c6..3daa0f8261 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -143,7 +143,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
void LLDrawPoolTerrain::endRenderPass( S32 pass )
{
LLFastTimer t(FTM_RENDER_TERRAIN);
- LLFacePool::endRenderPass(pass);
+ //LLFacePool::endRenderPass(pass);
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0) {
sShader->unbind();
@@ -215,8 +215,10 @@ void LLDrawPoolTerrain::render(S32 pass)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
- sShader = &gObjectFullbrightProgram;
+ sShader = &gObjectFullbrightNonIndexedProgram;
sShader->bind();
+ LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
sShader = old_shader;
sShader->bind();