ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static void update_array ( GLcontext *  ctx,
struct gl_client_array array,
GLbitfield  dirtyBit,
GLsizei  elementSize,
GLint  size,
GLenum  type,
GLsizei  stride,
GLboolean  normalized,
const GLvoid ptr 
) [static]

Update the fields of a vertex array object. We need to do a few special things for arrays that live in vertex buffer objects.

Parameters:
arraythe array to update
dirtyBitwhich bit to set in ctx->Array.NewState for this array
elementSizesize of each array element, in bytes
sizecomponents per element (1, 2, 3 or 4)
typedatatype of each component (GL_FLOAT, GL_INT, etc)
stridestride between elements, in elements
normalizedare integer types converted to floats in [-1, 1]?
ptrthe address (or offset inside VBO) of the array data

Definition at line 53 of file varray.c.

Referenced by _mesa_ColorPointer(), _mesa_EdgeFlagPointer(), _mesa_FogCoordPointerEXT(), _mesa_IndexPointer(), _mesa_NormalPointer(), _mesa_PointSizePointer(), _mesa_SecondaryColorPointerEXT(), _mesa_TexCoordPointer(), and _mesa_VertexPointer().

{
   array->Size = size;
   array->Type = type;
   array->Stride = stride;
   array->StrideB = stride ? stride : elementSize;
   array->Normalized = normalized;
   array->Ptr = (const GLubyte *) ptr;
#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 (ctx->Array.ArrayBufferObj->Name)
      array->_MaxElement = ((GLsizeiptrARB) ctx->Array.ArrayBufferObj->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;
}

Generated on Sun May 27 2012 04:58:55 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.