From 65161e6b393a6df6fa0a932aeb940fb7ac7ea084 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 12 Dec 2016 18:24:46 +0200 Subject: MAINT-6125 - Mesh avatar deforms constantly MAINT-6910 - [MAINT-RC] Some mesh turns invisible when camera is moved on the Maint-RC viewer only - caused by fix for MAINT-6125. Commulative fix. Fixed for booth ticket's in indra/newview/llvovolume.cpp Remained fixed, it's a small code improvements which is not related to MAINT-6125, MAINT-6910 --- indra/llrender/llvertexbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llvertexbuffer.cpp') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 5048799854..7e47471db6 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -509,7 +509,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } } - U32 map_tc[] = + static const U32 map_tc[] = { MAP_TEXCOORD1, MAP_TEXCOORD2, -- cgit v1.2.3 From 0f690ab4dae4c2888ace57362497752592d6fc77 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 30 Jan 2018 17:07:27 +0200 Subject: Add const --- indra/llrender/llvertexbuffer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llrender/llvertexbuffer.cpp') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 7e47471db6..3a1ce0cbb7 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -324,7 +324,7 @@ void LLVBOPool::cleanup() //NOTE: each component must be AT LEAST 4 bytes in size to avoid a performance penalty on AMD hardware -S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] = +const S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] = { sizeof(LLVector4), // TYPE_VERTEX, sizeof(LLVector4), // TYPE_NORMAL, @@ -341,7 +341,7 @@ S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] = sizeof(LLVector4), // TYPE_TEXTURE_INDEX (actually exists as position.w), no extra data, but stride is 16 bytes }; -static std::string vb_type_name[] = +static const std::string vb_type_name[] = { "TYPE_VERTEX", "TYPE_NORMAL", @@ -360,7 +360,7 @@ static std::string vb_type_name[] = "TYPE_INDEX", }; -U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] = +const U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] = { GL_TRIANGLES, GL_TRIANGLE_STRIP, @@ -1388,7 +1388,7 @@ void LLVertexBuffer::setupVertexArray() #endif sGLRenderArray = mGLArray; - U32 attrib_size[] = + static const U32 attrib_size[] = { 3, //TYPE_VERTEX, 3, //TYPE_NORMAL, @@ -1405,7 +1405,7 @@ void LLVertexBuffer::setupVertexArray() 1, //TYPE_TEXTURE_INDEX }; - U32 attrib_type[] = + static const U32 attrib_type[] = { GL_FLOAT, //TYPE_VERTEX, GL_FLOAT, //TYPE_NORMAL, @@ -1422,7 +1422,7 @@ void LLVertexBuffer::setupVertexArray() GL_UNSIGNED_INT, //TYPE_TEXTURE_INDEX }; - bool attrib_integer[] = + static const bool attrib_integer[] = { false, //TYPE_VERTEX, false, //TYPE_NORMAL, @@ -1439,7 +1439,7 @@ void LLVertexBuffer::setupVertexArray() true, //TYPE_TEXTURE_INDEX }; - U32 attrib_normalized[] = + static const U32 attrib_normalized[] = { GL_FALSE, //TYPE_VERTEX, GL_FALSE, //TYPE_NORMAL, -- cgit v1.2.3