diff options
author | graham linden <graham@lindenlab.com> | 2013-04-16 08:28:38 -0700 |
---|---|---|
committer | graham linden <graham@lindenlab.com> | 2013-04-16 08:28:38 -0700 |
commit | a054dff522ea874691cd859a8909a29d45cc8bd8 (patch) | |
tree | dfe34ed98d1d02d68084d1951fbc8f27f4360e9e /indra/llrender/llvertexbuffer.cpp | |
parent | c4413f493e65d1c12f382a9fe4363e90c6a1b8c3 (diff) | |
parent | d1f713f30bd4d42fe4696e25c01ab4532ef3b69b (diff) |
Merged lindenlab/viewer-development-materials into default
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 29fe5400a3..6108c6f821 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -613,8 +613,9 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con glVertexPointer(3, GL_FLOAT, 0, pos[0].mV); glNormalPointer(GL_FLOAT, 0, norm[0].mV); } - + LLGLSLShader::startProfile(); glDrawArrays(sGLMode[mode], 0, count); + LLGLSLShader::stopProfile(count, mode); } //static @@ -651,7 +652,9 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto glVertexPointer(3, GL_FLOAT, 16, pos); } + LLGLSLShader::startProfile(); glDrawElements(sGLMode[mode], num_indices, GL_UNSIGNED_SHORT, indicesp); + LLGLSLShader::stopProfile(num_indices, mode); } void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_offset) const @@ -751,9 +754,14 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi U16* idx = ((U16*) getIndicesPointer())+indices_offset; stop_glerror(); + LLGLSLShader::startProfile(); glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT, idx); + LLGLSLShader::stopProfile(count, mode); stop_glerror(); + + + placeFence(); } @@ -797,8 +805,10 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const } stop_glerror(); + LLGLSLShader::startProfile(); glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT, ((U16*) getIndicesPointer()) + indices_offset); + LLGLSLShader::stopProfile(count, mode); stop_glerror(); placeFence(); } @@ -838,7 +848,9 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const } stop_glerror(); + LLGLSLShader::startProfile(); glDrawArrays(sGLMode[mode], first, count); + LLGLSLShader::stopProfile(count, mode); stop_glerror(); placeFence(); } |