summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-02-01 19:46:45 -0800
committerKenneth Graunke <[email protected]>2014-02-03 00:53:11 -0800
commite1b1f2a687c219021f65219df59f412bc86daadd (patch)
tree099b769f2306382a38177a61b07236eea9d66973 /src/mesa/main/attrib.c
parent0354e50798d9f199c3a47b71e8c0a284bba5e8e6 (diff)
mesa: Rename ElementArrayBufferObj to IndexBufferObj.
DirectX and most hardware documentation use the term "Index Buffer" to refer to a buffer containing indexes into arrays of vertex data, which allows random access to vertex data, rather than sequential access. OpenGL uses a different term for this concept: "Element Array Buffer". However, "Index Buffer" has become much more widespread. A quick Google search shows 29,300 hits for "Element Array Buffer" vs. 82,300 hits for "Index Buffer." Arguably, "Index Buffer" is clearer: an "element of an array" (or list) usually refers to an actual item stored in the array, not the index used to refer to it. The terminology is also already used in Mesa: some VBO module code for dealing with ElementArrayBufferObj names local variables "ib". Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ 's/ElementArrayBufferObj/IndexBufferObj/g' Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 5b5c48dbdab..00452804468 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1486,7 +1486,7 @@ copy_array_attrib(struct gl_context *ctx,
copy_array_object(ctx, dest->VAO, src->VAO);
/* skip ArrayBufferObj */
- /* skip ElementArrayBufferObj */
+ /* skip IndexBufferObj */
}
/**
@@ -1506,8 +1506,8 @@ save_array_attrib(struct gl_context *ctx,
/* Just reference them here */
_mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj,
src->ArrayBufferObj);
- _mesa_reference_buffer_object(ctx, &dest->VAO->ElementArrayBufferObj,
- src->VAO->ElementArrayBufferObj);
+ _mesa_reference_buffer_object(ctx, &dest->VAO->IndexBufferObj,
+ src->VAO->IndexBufferObj);
}
/**
@@ -1552,10 +1552,10 @@ restore_array_attrib(struct gl_context *ctx,
}
if (!arb_vao
- || src->VAO->ElementArrayBufferObj->Name == 0
- || _mesa_IsBuffer(src->VAO->ElementArrayBufferObj->Name))
+ || src->VAO->IndexBufferObj->Name == 0
+ || _mesa_IsBuffer(src->VAO->IndexBufferObj->Name))
_mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,
- src->VAO->ElementArrayBufferObj->Name);
+ src->VAO->IndexBufferObj->Name);
}
/**