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

vbo_save_api.c File Reference

#include "main/glheader.h"
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/dlist.h"
#include "main/enums.h"
#include "main/macros.h"
#include "main/api_noop.h"
#include "main/api_validate.h"
#include "main/api_arrayelt.h"
#include "main/vtxfmt.h"
#include "glapi/dispatch.h"
#include "vbo_context.h"
#include "vbo_attrib_tmp.h"

Defines

#define VBO_BUF_ID   12345
#define ERROR()   _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
#define ATTR(A, N, V0, V1, V2, V3)
#define TAG(x)   _save_##x

Functions

static GLuint _save_copy_vertices (GLcontext *ctx, const struct vbo_save_vertex_list *node, const GLfloat *src_buffer)
static struct
vbo_save_vertex_store
alloc_vertex_store (GLcontext *ctx)
static void free_vertex_store (GLcontext *ctx, struct vbo_save_vertex_store *vertex_store)
static GLfloat * map_vertex_store (GLcontext *ctx, struct vbo_save_vertex_store *vertex_store)
static void unmap_vertex_store (GLcontext *ctx, struct vbo_save_vertex_store *vertex_store)
static struct
vbo_save_primitive_store
alloc_prim_store (GLcontext *ctx)
static void _save_reset_counters (GLcontext *ctx)
static void _save_compile_vertex_list (GLcontext *ctx)
static void _save_wrap_buffers (GLcontext *ctx)
static void _save_wrap_filled_vertex (GLcontext *ctx)
static void _save_copy_to_current (GLcontext *ctx)
static void _save_copy_from_current (GLcontext *ctx)
static void _save_upgrade_vertex (GLcontext *ctx, GLuint attr, GLuint newsz)
static void save_fixup_vertex (GLcontext *ctx, GLuint attr, GLuint sz)
static void _save_reset_vertex (GLcontext *ctx)
static void DO_FALLBACK (GLcontext *ctx)
static void GLAPIENTRY _save_EvalCoord1f (GLfloat u)
static void GLAPIENTRY _save_EvalCoord1fv (const GLfloat *v)
static void GLAPIENTRY _save_EvalCoord2f (GLfloat u, GLfloat v)
static void GLAPIENTRY _save_EvalCoord2fv (const GLfloat *v)
static void GLAPIENTRY _save_EvalPoint1 (GLint i)
static void GLAPIENTRY _save_EvalPoint2 (GLint i, GLint j)
static void GLAPIENTRY _save_CallList (GLuint l)
static void GLAPIENTRY _save_CallLists (GLsizei n, GLenum type, const GLvoid *v)
GLboolean vbo_save_NotifyBegin (GLcontext *ctx, GLenum mode)
static void GLAPIENTRY _save_End (void)
static void GLAPIENTRY _save_DrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
static void GLAPIENTRY _save_DrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
static void GLAPIENTRY _save_DrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
static void GLAPIENTRY _save_DrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
static void GLAPIENTRY _save_DrawArrays (GLenum mode, GLint start, GLsizei count)
static void GLAPIENTRY _save_Rectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
static void GLAPIENTRY _save_EvalMesh1 (GLenum mode, GLint i1, GLint i2)
static void GLAPIENTRY _save_EvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
static void GLAPIENTRY _save_Begin (GLenum mode)
static void GLAPIENTRY _save_OBE_Rectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
static void GLAPIENTRY _save_OBE_DrawArrays (GLenum mode, GLint start, GLsizei count)
static void GLAPIENTRY _save_OBE_DrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
static void GLAPIENTRY _save_OBE_DrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
static void _save_vtxfmt_init (GLcontext *ctx)
void vbo_save_SaveFlushVertices (GLcontext *ctx)
void vbo_save_NewList (GLcontext *ctx, GLuint list, GLenum mode)
void vbo_save_EndList (GLcontext *ctx)
void vbo_save_BeginCallList (GLcontext *ctx, struct gl_display_list *dlist)
void vbo_save_EndCallList (GLcontext *ctx)
static void vbo_destroy_vertex_list (GLcontext *ctx, void *data)
static void vbo_print_vertex_list (GLcontext *ctx, void *data)
static void _save_current_init (GLcontext *ctx)
void vbo_save_api_init (struct vbo_save_context *save)
 Initialize the display list compiler.


Define Documentation

#define ATTR ( A,
N,
V0,
V1,
V2,
V3   ) 

Value:

do {                                                            \
   struct vbo_save_context *save = &vbo_context(ctx)->save;     \
                                                                \
   if (save->active_sz[A] != N)                         \
      save_fixup_vertex(ctx, A, N);                             \
                                                                \
   {                                                            \
      GLfloat *dest = save->attrptr[A];                 \
      if (N>0) dest[0] = V0;                                    \
      if (N>1) dest[1] = V1;                                    \
      if (N>2) dest[2] = V2;                                    \
      if (N>3) dest[3] = V3;                                    \
   }                                                            \
                                                                \
   if ((A) == 0) {                                              \
      GLuint i;                                                 \
                                                                \
      for (i = 0; i < save->vertex_size; i++)                   \
         save->buffer_ptr[i] = save->vertex[i];                 \
                                                                \
      save->buffer_ptr += save->vertex_size;                            \
                                                                \
      if (++save->vert_count >= save->max_vert)                 \
         _save_wrap_filled_vertex( ctx );                       \
   }                                                            \
} while (0)

 
#define ERROR (  )     _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );

#define TAG (  )     _save_##x

#define VBO_BUF_ID   12345


Function Documentation

static void GLAPIENTRY _save_Begin ( GLenum  mode  )  [static]

static void GLAPIENTRY _save_CallList ( GLuint  l  )  [static]

static void GLAPIENTRY _save_CallLists ( GLsizei  n,
GLenum  type,
const GLvoid *  v 
) [static]

static void _save_compile_vertex_list ( GLcontext ctx  )  [static]

static void _save_copy_from_current ( GLcontext ctx  )  [static]

static void _save_copy_to_current ( GLcontext ctx  )  [static]

static GLuint _save_copy_vertices ( GLcontext ctx,
const struct vbo_save_vertex_list node,
const GLfloat *  src_buffer 
) [static]

static void _save_current_init ( GLcontext ctx  )  [static]

static void GLAPIENTRY _save_DrawArrays ( GLenum  mode,
GLint  start,
GLsizei  count 
) [static]

static void GLAPIENTRY _save_DrawElements ( GLenum  mode,
GLsizei  count,
GLenum  type,
const GLvoid *  indices 
) [static]

static void GLAPIENTRY _save_DrawElementsBaseVertex ( GLenum  mode,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLint  basevertex 
) [static]

static void GLAPIENTRY _save_DrawRangeElements ( GLenum  mode,
GLuint  start,
GLuint  end,
GLsizei  count,
GLenum  type,
const GLvoid *  indices 
) [static]

static void GLAPIENTRY _save_DrawRangeElementsBaseVertex ( GLenum  mode,
GLuint  start,
GLuint  end,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLint  basevertex 
) [static]

static void GLAPIENTRY _save_End ( void   )  [static]

static void GLAPIENTRY _save_EvalCoord1f ( GLfloat  u  )  [static]

static void GLAPIENTRY _save_EvalCoord1fv ( const GLfloat *  v  )  [static]

static void GLAPIENTRY _save_EvalCoord2f ( GLfloat  u,
GLfloat  v 
) [static]

static void GLAPIENTRY _save_EvalCoord2fv ( const GLfloat *  v  )  [static]

static void GLAPIENTRY _save_EvalMesh1 ( GLenum  mode,
GLint  i1,
GLint  i2 
) [static]

static void GLAPIENTRY _save_EvalMesh2 ( GLenum  mode,
GLint  i1,
GLint  i2,
GLint  j1,
GLint  j2 
) [static]

static void GLAPIENTRY _save_EvalPoint1 ( GLint  i  )  [static]

static void GLAPIENTRY _save_EvalPoint2 ( GLint  i,
GLint  j 
) [static]

static void GLAPIENTRY _save_OBE_DrawArrays ( GLenum  mode,
GLint  start,
GLsizei  count 
) [static]

static void GLAPIENTRY _save_OBE_DrawElements ( GLenum  mode,
GLsizei  count,
GLenum  type,
const GLvoid *  indices 
) [static]

static void GLAPIENTRY _save_OBE_DrawRangeElements ( GLenum  mode,
GLuint  start,
GLuint  end,
GLsizei  count,
GLenum  type,
const GLvoid *  indices 
) [static]

static void GLAPIENTRY _save_OBE_Rectf ( GLfloat  x1,
GLfloat  y1,
GLfloat  x2,
GLfloat  y2 
) [static]

static void GLAPIENTRY _save_Rectf ( GLfloat  x1,
GLfloat  y1,
GLfloat  x2,
GLfloat  y2 
) [static]

static void _save_reset_counters ( GLcontext ctx  )  [static]

static void _save_reset_vertex ( GLcontext ctx  )  [static]

static void _save_upgrade_vertex ( GLcontext ctx,
GLuint  attr,
GLuint  newsz 
) [static]

static void _save_vtxfmt_init ( GLcontext ctx  )  [static]

static void _save_wrap_buffers ( GLcontext ctx  )  [static]

static void _save_wrap_filled_vertex ( GLcontext ctx  )  [static]

static struct vbo_save_primitive_store* alloc_prim_store ( GLcontext ctx  )  [static, read]

static struct vbo_save_vertex_store* alloc_vertex_store ( GLcontext ctx  )  [static, read]

static void DO_FALLBACK ( GLcontext ctx  )  [static]

static void free_vertex_store ( GLcontext ctx,
struct vbo_save_vertex_store vertex_store 
) [static]

static GLfloat* map_vertex_store ( GLcontext ctx,
struct vbo_save_vertex_store vertex_store 
) [static]

static void save_fixup_vertex ( GLcontext ctx,
GLuint  attr,
GLuint  sz 
) [static]

static void unmap_vertex_store ( GLcontext ctx,
struct vbo_save_vertex_store vertex_store 
) [static]

static void vbo_destroy_vertex_list ( GLcontext ctx,
void *  data 
) [static]

static void vbo_print_vertex_list ( GLcontext ctx,
void *  data 
) [static]

void vbo_save_api_init ( struct vbo_save_context save  ) 

Initialize the display list compiler.

void vbo_save_BeginCallList ( GLcontext ctx,
struct gl_display_list dlist 
)

void vbo_save_EndCallList ( GLcontext ctx  ) 

void vbo_save_EndList ( GLcontext ctx  ) 

void vbo_save_NewList ( GLcontext ctx,
GLuint  list,
GLenum  mode 
)

GLboolean vbo_save_NotifyBegin ( GLcontext ctx,
GLenum  mode 
)

void vbo_save_SaveFlushVertices ( GLcontext ctx  ) 


Generated on Sun Sep 27 06:47:52 2009 for Mesa vbo by  doxygen 1.5.4