aa++;
}
- check_vbo(actx, vao->ElementArrayBufferObj);
+ check_vbo(actx, vao->IndexBufferObj);
ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX);
ASSERT(aa - actx->arrays < 32);
memset(&ib, 0, sizeof(ib));
ib.type = type;
ib.ptr = indices;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
vbo_get_minmax_indices(ctx, &prim, &ib, &min, &max, 1);
return GL_FALSE;
/* Vertex buffer object tests */
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
/* use indices in the buffer object */
/* make sure count doesn't go outside buffer bounds */
- if (index_bytes(type, count) > ctx->Array.VAO->ElementArrayBufferObj->Size) {
+ if (index_bytes(type, count) > ctx->Array.VAO->IndexBufferObj->Size) {
_mesa_warning(ctx, "glDrawElements index out of buffer bounds");
return GL_FALSE;
}
return GL_FALSE;
/* Vertex buffer object tests */
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
/* use indices in the buffer object */
/* make sure count doesn't go outside buffer bounds */
for (i = 0; i < primcount; i++) {
if (index_bytes(type, count[i]) >
- ctx->Array.VAO->ElementArrayBufferObj->Size) {
+ ctx->Array.VAO->IndexBufferObj->Size) {
_mesa_warning(ctx,
"glMultiDrawElements index out of buffer bounds");
return GL_FALSE;
return GL_FALSE;
/* Vertex buffer object tests */
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
/* use indices in the buffer object */
/* make sure count doesn't go outside buffer bounds */
- if (index_bytes(type, count) > ctx->Array.VAO->ElementArrayBufferObj->Size) {
+ if (index_bytes(type, count) > ctx->Array.VAO->IndexBufferObj->Size) {
_mesa_warning(ctx, "glDrawRangeElements index out of buffer bounds");
return GL_FALSE;
}
return GL_FALSE;
/* Vertex buffer object tests */
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
/* use indices in the buffer object */
/* make sure count doesn't go outside buffer bounds */
- if (index_bytes(type, count) > ctx->Array.VAO->ElementArrayBufferObj->Size) {
+ if (index_bytes(type, count) > ctx->Array.VAO->IndexBufferObj->Size) {
_mesa_warning(ctx,
"glDrawElementsInstanced index out of buffer bounds");
return GL_FALSE;
* If no element array buffer is bound, an INVALID_OPERATION error is
* generated.
*/
- if (!_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(no buffer bound to GL_ELEMENT_ARRAY_BUFFER)", name);
return GL_FALSE;
{
(void) ctx;
unbind_array_object_vbos(ctx, obj);
- _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
+ _mesa_reference_buffer_object(ctx, &obj->IndexBufferObj, NULL);
_glthread_DESTROY_MUTEX(obj->Mutex);
free(obj->Label);
free(obj);
}
}
- _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj,
+ _mesa_reference_buffer_object(ctx, &obj->IndexBufferObj,
ctx->Shared->NullBufferObj);
}
copy_array_object(ctx, dest->VAO, src->VAO);
/* skip ArrayBufferObj */
- /* skip ElementArrayBufferObj */
+ /* skip IndexBufferObj */
}
/**
/* 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);
}
/**
}
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);
}
/**
case GL_ARRAY_BUFFER_ARB:
return &ctx->Array.ArrayBufferObj;
case GL_ELEMENT_ARRAY_BUFFER_ARB:
- return &ctx->Array.VAO->ElementArrayBufferObj;
+ return &ctx->Array.VAO->IndexBufferObj;
case GL_PIXEL_PACK_BUFFER_EXT:
return &ctx->Pack.BufferObj;
case GL_PIXEL_UNPACK_BUFFER_EXT:
#if 0
/* unfortunately, these tests are invalid during context tear-down */
ASSERT(ctx->Array.ArrayBufferObj != bufObj);
- ASSERT(ctx->Array.VAO->ElementArrayBufferObj != bufObj);
+ ASSERT(ctx->Array.VAO->IndexBufferObj != bufObj);
ASSERT(ctx->Array.VAO->Vertex.BufferObj != bufObj);
#endif
if (ctx->Array.ArrayBufferObj == bufObj) {
_mesa_BindBuffer( GL_ARRAY_BUFFER_ARB, 0 );
}
- if (vao->ElementArrayBufferObj == bufObj) {
+ if (vao->IndexBufferObj == bufObj) {
_mesa_BindBuffer( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
}
ctx->Array.VAO->VertexBinding[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].BufferObj->Name;
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- v->value_int = ctx->Array.VAO->ElementArrayBufferObj->Name;
+ v->value_int = ctx->Array.VAO->IndexBufferObj->Name;
break;
/* ARB_copy_buffer */
*/
GLuint _MaxElement;
- struct gl_buffer_object *ElementArrayBufferObj;
+ struct gl_buffer_object *IndexBufferObj;
};
const void *elemMap;
GLint i, k;
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
elemMap = ctx->Driver.MapBufferRange(ctx, 0,
- ctx->Array.VAO->ElementArrayBufferObj->Size,
+ ctx->Array.VAO->IndexBufferObj->Size,
GL_MAP_READ_BIT,
- ctx->Array.VAO->ElementArrayBufferObj);
+ ctx->Array.VAO->IndexBufferObj);
elements = ADD_POINTERS(elements, elemMap);
}
}
}
- if (_mesa_is_bufferobj(vao->ElementArrayBufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, ctx->Array.VAO->ElementArrayBufferObj);
+ if (_mesa_is_bufferobj(vao->IndexBufferObj)) {
+ ctx->Driver.UnmapBuffer(ctx, ctx->Array.VAO->IndexBufferObj);
}
for (k = 0; k < Elements(vao->_VertexAttrib); k++) {
{
const GLvoid *map =
ctx->Driver.MapBufferRange(ctx, 0,
- ctx->Array.VAO->ElementArrayBufferObj->Size,
+ ctx->Array.VAO->IndexBufferObj->Size,
GL_MAP_READ_BIT,
- ctx->Array.VAO->ElementArrayBufferObj);
+ ctx->Array.VAO->IndexBufferObj);
switch (type) {
case GL_UNSIGNED_BYTE:
{
const GLubyte *us = (const GLubyte *) map;
GLint i;
- for (i = 0; i < ctx->Array.VAO->ElementArrayBufferObj->Size; i++) {
+ for (i = 0; i < ctx->Array.VAO->IndexBufferObj->Size; i++) {
printf("%02x ", us[i]);
if (i % 32 == 31)
printf("\n");
{
const GLushort *us = (const GLushort *) map;
GLint i;
- for (i = 0; i < ctx->Array.VAO->ElementArrayBufferObj->Size / 2; i++) {
+ for (i = 0; i < ctx->Array.VAO->IndexBufferObj->Size / 2; i++) {
printf("%04x ", us[i]);
if (i % 16 == 15)
printf("\n");
{
const GLuint *us = (const GLuint *) map;
GLint i;
- for (i = 0; i < ctx->Array.VAO->ElementArrayBufferObj->Size / 4; i++) {
+ for (i = 0; i < ctx->Array.VAO->IndexBufferObj->Size / 4; i++) {
printf("%08x ", us[i]);
if (i % 8 == 7)
printf("\n");
;
}
- ctx->Driver.UnmapBuffer(ctx, ctx->Array.VAO->ElementArrayBufferObj);
+ ctx->Driver.UnmapBuffer(ctx, ctx->Array.VAO->IndexBufferObj);
}
#endif
ib.count = count;
ib.type = type;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = indices;
prim[0].begin = 1;
"(start %u, end %u, type 0x%x, count %d) ElemBuf %u, "
"base %d\n",
start, end, type, count,
- ctx->Array.VAO->ElementArrayBufferObj->Name,
+ ctx->Array.VAO->IndexBufferObj->Name,
basevertex);
}
* subranges of the index buffer as one large index buffer may lead to
* us reading unmapped memory.
*/
- if (!_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj))
+ if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj))
fallback = GL_TRUE;
if (!fallback) {
ib.count = (max_index_ptr - min_index_ptr) / index_type_size;
ib.type = type;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = (void *)min_index_ptr;
for (i = 0; i < primcount; i++) {
continue;
ib.count = count[i];
ib.type = type;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = indices[i];
prim[0].begin = 1;
ib.count = 0; /* unknown */
ib.type = type;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
memset(prim, 0, sizeof(prim));
vbo_bind_arrays(ctx);
- /* NOTE: ElementArrayBufferObj is guaranteed to be a VBO. */
+ /* NOTE: IndexBufferObj is guaranteed to be a VBO. */
ib.count = 0; /* unknown */
ib.type = type;
- ib.obj = ctx->Array.VAO->ElementArrayBufferObj;
+ ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
prim[0].begin = 1;
_ae_map_vbos(ctx);
- if (_mesa_is_bufferobj(ctx->Array.VAO->ElementArrayBufferObj))
+ if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj))
indices =
- ADD_POINTERS(ctx->Array.VAO->ElementArrayBufferObj->Pointer, indices);
+ ADD_POINTERS(ctx->Array.VAO->IndexBufferObj->Pointer, indices);
vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK |
VBO_SAVE_PRIM_NO_CURRENT_UPDATE));