diff options
author | Brian Paul <[email protected]> | 2009-05-06 15:17:25 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-07 10:12:33 -0600 |
commit | b9d0f947f2bcc47047b162e3d7c8f91b6153e02c (patch) | |
tree | 44ece271963c4792f87d690da436a6555ea32463 /src/mesa/main/varray.c | |
parent | 800b14cd378ed708a29230d92031ac7b6ad6a286 (diff) |
mesa: Compute gl_client_array->_MaxElement during array validation
Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but
if the VBO was reallocated the size could change.
New _NEW_BUFFER_OBJECT state flag.
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 527555be0e4..4d153b1c0b2 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -65,22 +65,9 @@ update_array(GLcontext *ctx, struct gl_client_array *array, array->Ptr = (const GLubyte *) ptr; array->_ElementSize = elementSize; -#if FEATURE_ARB_vertex_buffer_object _mesa_reference_buffer_object(ctx, &array->BufferObj, ctx->Array.ArrayBufferObj); - /* Compute the index of the last array element that's inside the buffer. - * Later in glDrawArrays we'll check if start + count > _MaxElement to - * be sure we won't go out of bounds. - */ - if (array->BufferObj->Name) - array->_MaxElement = ((GLsizeiptrARB) array->BufferObj->Size - - (GLsizeiptrARB) array->Ptr + array->StrideB - - elementSize) / array->StrideB; - else -#endif - array->_MaxElement = 2 * 1000 * 1000 * 1000; /* just a big number */ - ctx->NewState |= _NEW_ARRAY; ctx->Array.NewState |= dirtyBit; } |