diff --git a/indra/newview/alrenderutils.cpp b/indra/newview/alrenderutils.cpp index ee93ee29dcbae9dc3bb2a771e3fdf6cbb8a6f3cd..12814e350afbea2a1555da815ad6ccb7334470c2 100644 --- a/indra/newview/alrenderutils.cpp +++ b/indra/newview/alrenderutils.cpp @@ -293,30 +293,6 @@ ALRenderUtil::~ALRenderUtil() mSettingConnections.clear(); } -void ALRenderUtil::restoreVertexBuffers() -{ - mRenderBuffer = new LLVertexBuffer(ALRENDER_BUFFER_MASK); - mRenderBuffer->allocateBuffer(3, 0); - - LLStrider<LLVector3> vert; - LLStrider<LLVector2> tc0; - LLStrider<LLVector2> tc1; - mRenderBuffer->getVertexStrider(vert); - mRenderBuffer->getTexCoord0Strider(tc0); - mRenderBuffer->getTexCoord1Strider(tc1); - - vert[0].set(-1.f, -1.f, 0.f); - vert[1].set(3.f, -1.f, 0.f); - vert[2].set(-1.f, 3.f, 0.f); - - mRenderBuffer->unmapBuffer(); -} - -void ALRenderUtil::resetVertexBuffers() -{ - mRenderBuffer = nullptr; -} - void ALRenderUtil::releaseGLBuffers() { if (mCGLut) @@ -463,8 +439,8 @@ void ALRenderUtil::renderTonemap(LLRenderTarget* src, LLRenderTarget* exposure, tone_shader->uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, src->getWidth(), src->getHeight()); - mRenderBuffer->setBuffer(); - mRenderBuffer->drawArrays(LLRender::TRIANGLES, 0, 3); + gPipeline.mScreenTriangleVB->setBuffer(); + gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); stop_glerror(); tone_shader->unbindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage()); @@ -700,8 +676,8 @@ void ALRenderUtil::renderColorGrade(LLRenderTarget* src, LLRenderTarget* dst) tone_shader->uniform4fv(LLShaderMgr::COLORGRADE_LUT_SIZE, 1, mCGLutSize.mV); } - mRenderBuffer->setBuffer(); - mRenderBuffer->drawArrays(LLRender::TRIANGLES, 0, 3); + gPipeline.mScreenTriangleVB->setBuffer(); + gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); stop_glerror(); if (channel > -1) @@ -807,8 +783,8 @@ void ALRenderUtil::renderSharpen(LLRenderTarget* src, LLRenderTarget* dst) sharpen_shader->bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT); // Draw - mRenderBuffer->setBuffer(); - mRenderBuffer->drawArrays(LLRender::TRIANGLES, 0, 3); + gPipeline.mScreenTriangleVB->setBuffer(); + gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); sharpen_shader->unbind(); diff --git a/indra/newview/alrenderutils.h b/indra/newview/alrenderutils.h index 311f5e3a00c8205b3924d374ea94620be3a598f6..95fd72bc9c7cecd7abb40dd2a4f6a376292ac59d 100644 --- a/indra/newview/alrenderutils.h +++ b/indra/newview/alrenderutils.h @@ -40,11 +40,7 @@ class ALRenderUtil ALRenderUtil(); ~ALRenderUtil(); - void restoreVertexBuffers(); - void resetVertexBuffers(); - void releaseGLBuffers(); - void refreshState(); // Deferred Only Functions @@ -86,8 +82,5 @@ class ALRenderUtil U32 mCGLut; LLVector4 mCGLutSize; - // Vertex Buffers - LLPointer<LLVertexBuffer> mRenderBuffer; - std::vector<boost::signals2::scoped_connection> mSettingConnections; }; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 10c3946cfd37aed8ca3d8323e52388db228f5b0c..727d9d3c5191a9b655199c32858934b00f1e4afe 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3948,7 +3948,6 @@ LLCullResult::LLCullResult() mRenderMap[i].push_back(NULL); mRenderMapEnd[i] = &mRenderMap[i][0]; mRenderMapAllocated[i] = 0; - mRenderMapSize[i] = 0; } clear(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1952157bed1e73e147a1b972655e6a9964208749..8b30d6130ef571673730480e5dabdd3b5e01cf1d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -453,8 +453,6 @@ void LLPipeline::init() mScreenTriangleVB->unmapBuffer(); } - mALRenderUtil->restoreVertexBuffers(); - setLightingDetail(-1); //