summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2018-01-30 17:07:27 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2018-01-30 17:07:27 +0200
commit0f690ab4dae4c2888ace57362497752592d6fc77 (patch)
tree33b29d12693aede6ad2be1cf077bce51ebfb0031
parent55990724a37620f6a6835d14db4348166ea22848 (diff)
Add const
-rw-r--r--indra/llrender/llvertexbuffer.cpp14
-rw-r--r--indra/llrender/llvertexbuffer.h4
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;