GLuint max_index,
vbo_draw_func draw );
-static inline int
-vbo_sizeof_ib_type(GLenum type)
-{
- switch (type) {
- case GL_UNSIGNED_INT:
- return sizeof(GLuint);
- case GL_UNSIGNED_SHORT:
- return sizeof(GLushort);
- case GL_UNSIGNED_BYTE:
- return sizeof(GLubyte);
- default:
- assert(!"unsupported index data type");
- /* In case assert is turned off */
- return 0;
- }
-}
void
vbo_delete_minmax_cache(struct gl_buffer_object *bufferObj);
}
+static inline int
+sizeof_ib_type(GLenum type)
+{
+ switch (type) {
+ case GL_UNSIGNED_INT:
+ return sizeof(GLuint);
+ case GL_UNSIGNED_SHORT:
+ return sizeof(GLushort);
+ case GL_UNSIGNED_BYTE:
+ return sizeof(GLubyte);
+ default:
+ assert(!"unsupported index data type");
+ /* In case assert is turned off */
+ return 0;
+ }
+}
+
/**
* Examine the array's data for NaNs, etc.
* For debug purposes; not normally used.
vbo_bind_arrays(ctx);
ib.count = count;
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = indices;
struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
struct _mesa_prim *prim;
- unsigned int index_type_size = vbo_sizeof_ib_type(type);
+ unsigned int index_type_size = sizeof_ib_type(type);
uintptr_t min_index_ptr, max_index_ptr;
GLboolean fallback = GL_FALSE;
int i;
if (!fallback) {
ib.count = (max_index_ptr - min_index_ptr) / index_type_size;
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = (void *) min_index_ptr;
if (count[i] == 0)
continue;
ib.count = count[i];
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = indices[i];
vbo_bind_arrays(ctx);
ib.count = 0; /* unknown */
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
/* NOTE: IndexBufferObj is guaranteed to be a VBO. */
ib.count = 0; /* unknown */
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
/* NOTE: IndexBufferObj is guaranteed to be a VBO. */
ib.count = 0; /* unknown */
- ib.index_size = vbo_sizeof_ib_type(type);
+ ib.index_size = sizeof_ib_type(type);
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;