mesa: added _ElementSize field to gl_client_array

Will be handy for bounds checking later...
This commit is contained in:
Brian Paul
2009-05-06 13:00:35 -06:00
parent a6c8e900af
commit 0077c879b5
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -1541,6 +1541,7 @@ struct gl_client_array
const GLubyte *Ptr; /**< Points to array data */
GLboolean Enabled; /**< Enabled flag is a boolean */
GLboolean Normalized; /**< GL_ARB_vertex_program */
GLuint _ElementSize; /**< size of each element in bytes */
struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
GLuint _MaxElement; /**< max element index into array buffer */
+2
View File
@@ -63,6 +63,8 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
array->StrideB = stride ? stride : elementSize;
array->Normalized = normalized;
array->Ptr = (const GLubyte *) ptr;
array->_ElementSize = elementSize;
#if FEATURE_ARB_vertex_buffer_object
_mesa_reference_buffer_object(ctx, &array->BufferObj,
ctx->Array.ArrayBufferObj);