summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.h
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2021-03-17 20:17:12 +0000
committerEuclid Linden <euclid@lindenlab.com>2021-03-17 20:17:12 +0000
commit0104e5c13d9bc34e439ee62c4f711a18f997f092 (patch)
tree0e322ed210d9600530f0d916fbb18f8330e6aee7 /indra/llrender/llvertexbuffer.h
parentf6ddd91dd6cb908e12cd6223273b3199675bcbe8 (diff)
parente70473f79437c281b51f96a5389d2456fee70a80 (diff)
Merged in euclid (pull request #495)
Cherry-pick a couple quality-of-life commits from LMR#5
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r--indra/llrender/llvertexbuffer.h43
1 files changed, 23 insertions, 20 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 9867bd16d6..dbe1a3687f 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -155,9 +155,8 @@ public:
//get the size of a buffer with the given typemask and vertex count
//fill offsets with the offset of each vertex component array into the buffer
// indexed by the following enum
- static S32 calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices);
+ static S32 calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices);
-
//WARNING -- when updating these enums you MUST
// 1 - update LLVertexBuffer::sTypeSize
// 2 - add a strider accessor
@@ -165,24 +164,28 @@ public:
// 4 - modify LLVertexBuffer::setupClientArray
// 5 - modify LLViewerShaderMgr::mReservedAttribs
// 6 - update LLVertexBuffer::setupVertexArray
- enum {
- TYPE_VERTEX = 0,
- TYPE_NORMAL,
- TYPE_TEXCOORD0,
- TYPE_TEXCOORD1,
- TYPE_TEXCOORD2,
- TYPE_TEXCOORD3,
- TYPE_COLOR,
- TYPE_EMISSIVE,
- TYPE_TANGENT,
- TYPE_WEIGHT,
- TYPE_WEIGHT4,
- TYPE_CLOTHWEIGHT,
- TYPE_TEXTURE_INDEX,
- TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
- TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
- };
- enum {
+
+ // clang-format off
+ enum { // Shader attribute name, set in LLShaderMgr::initAttribsAndUniforms()
+ TYPE_VERTEX = 0, // "position"
+ TYPE_NORMAL, // "normal"
+ TYPE_TEXCOORD0, // "texcoord0"
+ TYPE_TEXCOORD1, // "texcoord1"
+ TYPE_TEXCOORD2, // "texcoord2"
+ TYPE_TEXCOORD3, // "texcoord3"
+ TYPE_COLOR, // "diffuse_color"
+ TYPE_EMISSIVE, // "emissive"
+ TYPE_TANGENT, // "tangent"
+ TYPE_WEIGHT, // "weight"
+ TYPE_WEIGHT4, // "weight4"
+ TYPE_CLOTHWEIGHT, // "clothing"
+ TYPE_TEXTURE_INDEX, // "texture_index"
+ TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
+ TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
+ };
+ // clang-format on
+
+ enum {
MAP_VERTEX = (1<<TYPE_VERTEX),
MAP_NORMAL = (1<<TYPE_NORMAL),
MAP_TEXCOORD0 = (1<<TYPE_TEXCOORD0),