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

vbo_exec_api.c File Reference

#include "main/glheader.h"
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/vtxfmt.h"
#include "main/state.h"
#include "main/light.h"
#include "main/api_arrayelt.h"
#include "main/api_noop.h"
#include "glapi/dispatch.h"
#include "vbo_context.h"
#include "vbo_attrib_tmp.h"

Defines

#define IMM_BUFFER_NAME   0xaabbccdd
 ID/name for immediate-mode VBO.
#define ATTR(A, N, V0, V1, V2, V3)
#define ERROR()   _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ )
#define TAG(x)   vbo_##x

Functions

static void reset_attrfv (struct vbo_exec_context *exec)
static void vbo_exec_wrap_buffers (struct vbo_exec_context *exec)
void vbo_exec_vtx_wrap (struct vbo_exec_context *exec)
static void vbo_exec_copy_to_current (struct vbo_exec_context *exec)
static void vbo_exec_copy_from_current (struct vbo_exec_context *exec)
static void vbo_exec_wrap_upgrade_vertex (struct vbo_exec_context *exec, GLuint attr, GLuint newsz)
static void vbo_exec_fixup_vertex (GLcontext *ctx, GLuint attr, GLuint sz)
static void GLAPIENTRY vbo_exec_EvalCoord1f (GLfloat u)
static void GLAPIENTRY vbo_exec_EvalCoord2f (GLfloat u, GLfloat v)
static void GLAPIENTRY vbo_exec_EvalCoord1fv (const GLfloat *u)
static void GLAPIENTRY vbo_exec_EvalCoord2fv (const GLfloat *u)
static void GLAPIENTRY vbo_exec_EvalPoint1 (GLint i)
static void GLAPIENTRY vbo_exec_EvalPoint2 (GLint i, GLint j)
static void GLAPIENTRY vbo_exec_Begin (GLenum mode)
static void GLAPIENTRY vbo_exec_End (void)
static void vbo_exec_vtxfmt_init (struct vbo_exec_context *exec)
void vbo_use_buffer_objects (GLcontext *ctx)
 Tell the VBO module to use a real OpenGL vertex buffer object to store accumulated immediate-mode vertex data.
void vbo_exec_vtx_init (struct vbo_exec_context *exec)
void vbo_exec_vtx_destroy (struct vbo_exec_context *exec)
void vbo_exec_BeginVertices (GLcontext *ctx)
void vbo_exec_FlushVertices_internal (GLcontext *ctx, GLboolean unmap)
void vbo_exec_FlushVertices (GLcontext *ctx, GLuint flags)
void GLAPIENTRY _vbo_Color4f (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void GLAPIENTRY _vbo_Normal3f (GLfloat x, GLfloat y, GLfloat z)
void GLAPIENTRY _vbo_MultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
void GLAPIENTRY _vbo_Materialfv (GLenum face, GLenum pname, const GLfloat *params)
void GLAPIENTRY _vbo_VertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)


Define Documentation

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

Value:

do {                                                            \
   struct vbo_exec_context *exec = &vbo_context(ctx)->exec;     \
                                                                \
   if (exec->vtx.active_sz[A] != N)                             \
      vbo_exec_fixup_vertex(ctx, A, N);                 \
                                                                \
   {                                                            \
      GLfloat *dest = exec->vtx.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 < exec->vtx.vertex_size; i++)               \
         exec->vtx.buffer_ptr[i] = exec->vtx.vertex[i];         \
                                                                \
      exec->vtx.buffer_ptr += exec->vtx.vertex_size;                    \
      exec->ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;     \
                                                                \
      if (++exec->vtx.vert_count >= exec->vtx.max_vert)         \
         vbo_exec_vtx_wrap( exec );                             \
   }                                                            \
} while (0)

 
#define ERROR (  )     _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ )

#define IMM_BUFFER_NAME   0xaabbccdd

ID/name for immediate-mode VBO.

#define TAG (  )     vbo_##x


Function Documentation

void GLAPIENTRY _vbo_Color4f ( GLfloat  r,
GLfloat  g,
GLfloat  b,
GLfloat  a 
)

void GLAPIENTRY _vbo_Materialfv ( GLenum  face,
GLenum  pname,
const GLfloat *  params 
)

void GLAPIENTRY _vbo_MultiTexCoord4f ( GLenum  target,
GLfloat  s,
GLfloat  t,
GLfloat  r,
GLfloat  q 
)

void GLAPIENTRY _vbo_Normal3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)

void GLAPIENTRY _vbo_VertexAttrib4f ( GLuint  index,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

static void reset_attrfv ( struct vbo_exec_context exec  )  [static]

static void GLAPIENTRY vbo_exec_Begin ( GLenum  mode  )  [static]

void vbo_exec_BeginVertices ( GLcontext ctx  ) 

static void vbo_exec_copy_from_current ( struct vbo_exec_context exec  )  [static]

static void vbo_exec_copy_to_current ( struct vbo_exec_context exec  )  [static]

static void GLAPIENTRY vbo_exec_End ( void   )  [static]

static void GLAPIENTRY vbo_exec_EvalCoord1f ( GLfloat  u  )  [static]

static void GLAPIENTRY vbo_exec_EvalCoord1fv ( const GLfloat *  u  )  [static]

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

static void GLAPIENTRY vbo_exec_EvalCoord2fv ( const GLfloat *  u  )  [static]

static void GLAPIENTRY vbo_exec_EvalPoint1 ( GLint  i  )  [static]

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

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

void vbo_exec_FlushVertices ( GLcontext ctx,
GLuint  flags 
)

void vbo_exec_FlushVertices_internal ( GLcontext ctx,
GLboolean  unmap 
)

void vbo_exec_vtx_destroy ( struct vbo_exec_context exec  ) 

void vbo_exec_vtx_init ( struct vbo_exec_context exec  ) 

void vbo_exec_vtx_wrap ( struct vbo_exec_context exec  ) 

static void vbo_exec_vtxfmt_init ( struct vbo_exec_context exec  )  [static]

static void vbo_exec_wrap_buffers ( struct vbo_exec_context exec  )  [static]

static void vbo_exec_wrap_upgrade_vertex ( struct vbo_exec_context exec,
GLuint  attr,
GLuint  newsz 
) [static]

void vbo_use_buffer_objects ( GLcontext ctx  ) 

Tell the VBO module to use a real OpenGL vertex buffer object to store accumulated immediate-mode vertex data.

This replaces the malloced buffer which was created in vb_exec_vtx_init() below.


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