core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

varray.c File Reference

#include "glheader.h"
#include "imports.h"
#include "bufferobj.h"
#include "context.h"
#include "enable.h"
#include "enums.h"
#include "hash.h"
#include "mtypes.h"
#include "varray.h"
#include "arrayobj.h"
#include "glapi/dispatch.h"

Functions

static GLboolean update_array (GLcontext *ctx, struct gl_client_array *array, GLbitfield dirtyBit, GLsizei elementSize, GLint size, GLenum type, GLenum format, GLsizei stride, GLboolean normalized, const GLvoid *ptr)
 Set the fields of a vertex array.
void GLAPIENTRY _mesa_VertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_NormalPointer (GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_ColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_FogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_IndexPointer (GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_SecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_TexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_EdgeFlagPointer (GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_PointSizePointer (GLenum type, GLsizei stride, const GLvoid *ptr)
void GLAPIENTRY _mesa_VertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr)
void GLAPIENTRY _mesa_NormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr)
void GLAPIENTRY _mesa_ColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr)
void GLAPIENTRY _mesa_IndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr)
void GLAPIENTRY _mesa_TexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr)
void GLAPIENTRY _mesa_EdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *ptr)
void GLAPIENTRY _mesa_InterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer)
void GLAPIENTRY _mesa_LockArraysEXT (GLint first, GLsizei count)
void GLAPIENTRY _mesa_UnlockArraysEXT (void)
void GLAPIENTRY _mesa_MultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
void GLAPIENTRY _mesa_MultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride)
void GLAPIENTRY _mesa_MultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid *const *indices, GLsizei primcount, GLint modestride)
void _mesa_copy_client_array (GLcontext *ctx, struct gl_client_array *dst, struct gl_client_array *src)
 Copy one client vertex array to another.
static void print_array (const char *name, GLint index, const struct gl_client_array *array)
 Print vertex array's fields.
void _mesa_print_arrays (GLcontext *ctx)
 Print current vertex object/array info.
void _mesa_init_varray (GLcontext *ctx)
 Initialize vertex array state for given context.
static void delete_arrayobj_cb (GLuint id, void *data, void *userData)
 Callback for deleting an array object.
void _mesa_free_varray_data (GLcontext *ctx)
 Free vertex array state for given context.


Function Documentation

void GLAPIENTRY _mesa_ColorPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_ColorPointerEXT ( GLint  size,
GLenum  type,
GLsizei  stride,
GLsizei  count,
const GLvoid *  ptr 
)

void _mesa_copy_client_array ( GLcontext ctx,
struct gl_client_array dst,
struct gl_client_array src 
)

Copy one client vertex array to another.

void GLAPIENTRY _mesa_EdgeFlagPointer ( GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_EdgeFlagPointerEXT ( GLsizei  stride,
GLsizei  count,
const GLboolean *  ptr 
)

void GLAPIENTRY _mesa_FogCoordPointerEXT ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void _mesa_free_varray_data ( GLcontext ctx  ) 

Free vertex array state for given context.

void GLAPIENTRY _mesa_IndexPointer ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_IndexPointerEXT ( GLenum  type,
GLsizei  stride,
GLsizei  count,
const GLvoid *  ptr 
)

void _mesa_init_varray ( GLcontext ctx  ) 

Initialize vertex array state for given context.

void GLAPIENTRY _mesa_InterleavedArrays ( GLenum  format,
GLsizei  stride,
const GLvoid *  pointer 
)

void GLAPIENTRY _mesa_LockArraysEXT ( GLint  first,
GLsizei  count 
)

void GLAPIENTRY _mesa_MultiDrawArraysEXT ( GLenum  mode,
GLint *  first,
GLsizei *  count,
GLsizei  primcount 
)

void GLAPIENTRY _mesa_MultiModeDrawArraysIBM ( const GLenum *  mode,
const GLint *  first,
const GLsizei *  count,
GLsizei  primcount,
GLint  modestride 
)

void GLAPIENTRY _mesa_MultiModeDrawElementsIBM ( const GLenum *  mode,
const GLsizei *  count,
GLenum  type,
const GLvoid *const *  indices,
GLsizei  primcount,
GLint  modestride 
)

void GLAPIENTRY _mesa_NormalPointer ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_NormalPointerEXT ( GLenum  type,
GLsizei  stride,
GLsizei  count,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_PointSizePointer ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void _mesa_print_arrays ( GLcontext ctx  ) 

Print current vertex object/array info.

For debug.

void GLAPIENTRY _mesa_SecondaryColorPointerEXT ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_TexCoordPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_TexCoordPointerEXT ( GLint  size,
GLenum  type,
GLsizei  stride,
GLsizei  count,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_UnlockArraysEXT ( void   ) 

void GLAPIENTRY _mesa_VertexPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

void GLAPIENTRY _mesa_VertexPointerEXT ( GLint  size,
GLenum  type,
GLsizei  stride,
GLsizei  count,
const GLvoid *  ptr 
)

static void delete_arrayobj_cb ( GLuint  id,
void *  data,
void *  userData 
) [static]

Callback for deleting an array object.

Called by _mesa_HashDeleteAll().

static void print_array ( const char *  name,
GLint  index,
const struct gl_client_array array 
) [static]

Print vertex array's fields.

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

Set the fields of a vertex array.

Also do an error check for GL_ARB_vertex_array_object: check that all arrays reside in VBOs when using a vertex array object.

Parameters:
array the array to update
dirtyBit which bit to set in ctx->Array.NewState for this array
elementSize size of each array element, in bytes
size components per element (1, 2, 3 or 4)
type datatype of each component (GL_FLOAT, GL_INT, etc)
format either GL_RGBA or GL_BGRA
stride stride between elements, in elements
normalized are integer types converted to floats in [-1, 1]?
ptr the address (or offset inside VBO) of the array data
Returns:
GL_TRUE if no error, GL_FALSE if error


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4