diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 14 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 4 |
2 files changed, 9 insertions, 9 deletions
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, diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index bd27296eb6..c89d7e3958 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -341,8 +341,8 @@ public: static bool sDisableVBOMapping; //disable glMapBufferARB static bool sEnableVBOs; - static S32 sTypeSize[TYPE_MAX]; - static U32 sGLMode[LLRender::NUM_MODES]; + static const S32 sTypeSize[TYPE_MAX]; + static const U32 sGLMode[LLRender::NUM_MODES]; static U32 sGLRenderBuffer; static U32 sGLRenderArray; static U32 sGLRenderIndices; |