diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 2b26b2dbc8a1edd2a8689f491521411ded7e5e7a..d63b8daec39848b45f0ab7f361e2dde54cb4282d 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -606,9 +606,7 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con normal_strider.copyArray(0, norm.data(), count); sUtilityBuffer->setBuffer(MAP_VERTEX | MAP_NORMAL); - LLGLSLShader::startProfile(); sUtilityBuffer->drawArrays(mode, 0, pos.size()); - LLGLSLShader::stopProfile(count, mode); } //static @@ -657,9 +655,7 @@ void LLVertexBuffer::drawElements(U32 mode, const S32 num_vertices, const LLVect } sUtilityBuffer->setBuffer(mask); - LLGLSLShader::startProfile(); sUtilityBuffer->draw(mode, num_indices, 0); - LLGLSLShader::stopProfile(num_indices, mode); } void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_offset) const diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 5c389d45cd9d42ed08f2bc58c9e47e2a0de2230d..855169713f22e305f785a8f47d78509cdf726f39 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -593,16 +593,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) glPolygonOffset(-1.f, -1.f); gGL.multMatrix((F32*) volume->getRelativeXform().mMatrix); const LLVolumeFace& vol_face = rigged->getVolumeFace(getTEOffset()); - LLVertexBuffer::unbind(); - glVertexPointer(3, GL_FLOAT, 16, vol_face.mPositions); - if (vol_face.mTexCoords) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, 8, vol_face.mTexCoords); - } - gGL.syncMatrices(); - glDrawElements(GL_TRIANGLES, vol_face.mNumIndices, GL_UNSIGNED_SHORT, vol_face.mIndices); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); + LLVertexBuffer::drawElements(LLRender::TRIANGLES,vol_face.mNumVertices, vol_face.mPositions, vol_face.mTexCoords, vol_face.mNumIndices, vol_face.mIndices); } } } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 2f7d6590dd1d15d34c341db9efe249df9bde25f7..7bf9ea998637579ce10b9a7b6a1ba16e1dd7eace 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2655,16 +2655,12 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) if (phys_volume->mHullPoints && phys_volume->mHullIndices) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShader != 0); - LLVertexBuffer::unbind(); - glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints); gGL.diffuseColor4fv(line_color.mV); - gGL.syncMatrices(); - glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices); - + LLVertexBuffer::drawElements(LLRender::TRIANGLES, phys_volume->mNumHullPoints, phys_volume->mHullPoints, NULL, phys_volume->mNumHullIndices, phys_volume->mHullIndices); + gGL.diffuseColor4fv(color.mV); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices); + LLVertexBuffer::drawElements(LLRender::TRIANGLES, phys_volume->mNumHullPoints, phys_volume->mHullPoints, NULL, phys_volume->mNumHullIndices, phys_volume->mHullIndices); } else { @@ -3178,11 +3174,8 @@ void renderRaycast(LLDrawable* drawablep) { //render face positions - LLVertexBuffer::unbind(); - gGL.diffuseColor4f(0,1,1,0.5f); - glVertexPointer(3, GL_FLOAT, sizeof(LLVector4a), face.mPositions); - gGL.syncMatrices(); - glDrawElements(GL_TRIANGLES, face.mNumIndices, GL_UNSIGNED_SHORT, face.mIndices); + gGL.diffuseColor4f(0.f, 1.f, 1.f, 0.5f); + LLVertexBuffer::drawElements(LLRender::TRIANGLES, face.mNumVertices, face.mPositions, NULL, face.mNumIndices, face.mIndices); } if (!volume->isUnique())