diff options
author | Graham Madarasz (Graham Linden) <graham@lindenlab.com> | 2013-07-29 18:59:45 -0700 |
---|---|---|
committer | Graham Madarasz (Graham Linden) <graham@lindenlab.com> | 2013-07-29 18:59:45 -0700 |
commit | b44e7303d85ffc59afe34a97342d83a04b180c48 (patch) | |
tree | 7ec816364f9c4027a3baad83641ccf3a2c521637 /indra/newview | |
parent | be89f2f8fb234cc8d0d511df2384422d92e134b8 (diff) |
NORSPEC-314 WIP fix srgb_mac use and issues found with RenderDebugGL on Mac
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/lldrawpoolalpha.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llviewershadermgr.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/pipeline.cpp | 19 |
3 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 6302cf6b00..f4f63e1042 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -529,7 +529,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) } } - params.mVertexBuffer->setBuffer(mask); + params.mVertexBuffer->setBuffer(mask & ~(params.mFullbright ? (LLVertexBuffer::MAP_TEXTURE_INDEX | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2) : 0)); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 545a236f81..73177d549b 100755 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1444,7 +1444,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredMultiLightProgram[i].mName = llformat("Deferred MultiLight Shader %d", i); gDeferredMultiLightProgram[i].mShaderFiles.clear(); - gDeferredMultiLightProgram[i].mFeatures.hasSRGB = true; gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredMultiLightProgram[i].mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER_ARB)); gDeferredMultiLightProgram[i].mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 165b28beb5..05390f64f0 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8695,12 +8695,6 @@ void LLPipeline::renderDeferredLighting() unbindDeferredShader(gDeferredSpotLightProgram); } - //reset mDeferredVB to fullscreen triangle - mDeferredVB->getVertexStrider(vert); - vert[0].set(-1,1,0); - vert[1].set(-1,-3,0); - vert[2].set(3,1,0); - { LLGLDepthTest depth(GL_FALSE); @@ -8719,6 +8713,10 @@ void LLPipeline::renderDeferredLighting() F32 far_z = 0.f; + bindDeferredShader(gDeferredMultiLightProgram[0]); + + mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); + while (!fullscreen_lights.empty()) { LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS); @@ -8743,14 +8741,15 @@ void LLPipeline::renderDeferredLighting() gDeferredMultiLightProgram[idx].uniform4fv(LLShaderMgr::MULTI_LIGHT_COL, count, (GLfloat*) col); gDeferredMultiLightProgram[idx].uniform1f(LLShaderMgr::MULTI_LIGHT_FAR_Z, far_z); far_z = 0.f; - count = 0; - mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); + count = 0; + mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3); + unbindDeferredShader(gDeferredMultiLightProgram[idx]); } } - - unbindDeferredShader(gDeferredMultiLightProgram[0]); + unbindDeferredShader(gDeferredMultiLightProgram[0]); + bindDeferredShader(gDeferredMultiSpotLightProgram); gDeferredMultiSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION); |