diff options
Diffstat (limited to 'src/mesa/math/m_vector.h')
-rw-r--r-- | src/mesa/math/m_vector.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/mesa/math/m_vector.h b/src/mesa/math/m_vector.h index 647388ac7d..71281d5758 100644 --- a/src/mesa/math/m_vector.h +++ b/src/mesa/math/m_vector.h @@ -31,7 +31,6 @@ #define _M_VECTOR_H_ #include "main/glheader.h" -#include "main/mtypes.h" /* hack for GLchan */ #define VEC_DIRTY_0 0x1 @@ -50,7 +49,8 @@ -/* Wrap all the information about vectors up in a struct. Has +/** + * Wrap all the information about vectors up in a struct. Has * additional fields compared to the other vectors to help us track of * different vertex sizes, and whether we need to clean columns out * because they contain non-(0,0,0,1) values. @@ -60,29 +60,27 @@ * the transformation routines. */ typedef struct { - GLfloat (*data)[4]; /* may be malloc'd or point to client data */ - GLfloat *start; /* points somewhere inside of <data> */ - GLuint count; /* size of the vector (in elements) */ - GLuint stride; /* stride from one element to the next (in bytes) */ - GLuint size; /* 2-4 for vertices and 1-4 for texcoords */ - GLuint flags; /* which columns are dirty */ - void *storage; /* self-allocated storage */ + GLfloat (*data)[4]; /**< may be malloc'd or point to client data */ + GLfloat *start; /**< points somewhere inside of <data> */ + GLuint count; /**< size of the vector (in elements) */ + GLuint stride; /**< stride from one element to the next (in bytes) */ + GLuint size; /**< 2-4 for vertices and 1-4 for texcoords */ + GLbitfield flags; /**< bitmask of VEC_x flags */ + void *storage; /**< self-allocated storage */ + GLuint storage_count; /**< storage size in elements */ } GLvector4f; -extern void _mesa_vector4f_init( GLvector4f *v, GLuint flags, +extern void _mesa_vector4f_init( GLvector4f *v, GLbitfield flags, GLfloat (*storage)[4] ); -extern void _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, +extern void _mesa_vector4f_alloc( GLvector4f *v, GLbitfield flags, GLuint count, GLuint alignment ); extern void _mesa_vector4f_free( GLvector4f *v ); -extern void _mesa_vector4f_print( GLvector4f *v, GLubyte *, GLboolean ); +extern void _mesa_vector4f_print( const GLvector4f *v, const GLubyte *, GLboolean ); extern void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint nr, GLuint elt ); - - - -/* +/** * Given vector <v>, return a pointer (cast to <type *> to the <i>-th element. * * End up doing a lot of slow imuls if not careful. |