diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-04 13:51:31 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-04 13:51:31 +0300 |
commit | e5bcd6f50a8247dde1121210150835d968dc214d (patch) | |
tree | 27f2d17c397bbebc1a1071248b63dc6d33a43cb7 /indra/newview/llface.cpp | |
parent | e25d23aaac77f3793207aa0baf59ae64ea5eba41 (diff) | |
parent | 2fc8d5ff3cfa1b9ad00b310cd4a6cdb557b9415c (diff) |
Merge branch 'develop' into marchcat/b-develop
# Conflicts:
# indra/llcommon/llerror.h
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d92a5be8b6..570061d491 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -567,12 +567,14 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial()) { vertex_buffer = mVertexBufferGLTF.get(); - vertex_buffer->unmapBuffer(); } } // Draw the selection marker using the correctly chosen vertex buffer - vertex_buffer->setBuffer(); - vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex); + if (vertex_buffer) + { + vertex_buffer->setBuffer(); + vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex); + } } gGL.popMatrix(); @@ -1210,7 +1212,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume, mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask()); } - // Clone the existing vertex buffer into the temporary one + // Clone the existing vertex buffer into the temporary one + // TODO: factor out the need for mVertexBufferGLTF and make selection highlight shader work with the existing vertex buffer mVertexBuffer->clone(*mVertexBufferGLTF); // Recursive call the same function with the argument rebuild_for_gltf set to true @@ -1218,6 +1221,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume, mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer); getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true); mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer); + mVertexBufferGLTF->unmapBuffer(); } else if (!tep->isSelected() && mVertexBufferGLTF.notNull()) { |