summaryrefslogtreecommitdiff
path: root/src/mesa/math/m_xform.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-12-26 05:09:27 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-12-26 05:09:27 +0000
commitcab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290 (patch)
tree45385bd755d8e3876c54b2b0113636f5ceb7976a /src/mesa/math/m_xform.h
parentd1ff1f6798b003a820f5de9fad835ff352f31afe (diff)
Major rework of tnl module
New array_cache module Support 8 texture units in core mesa (now support 8 everywhere) Rework core mesa statechange operations to avoid flushing on many noop statechanges.
Diffstat (limited to 'src/mesa/math/m_xform.h')
-rw-r--r--src/mesa/math/m_xform.h68
1 files changed, 32 insertions, 36 deletions
diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h
index 7fc5be3ab1..046fc3d937 100644
--- a/src/mesa/math/m_xform.h
+++ b/src/mesa/math/m_xform.h
@@ -1,4 +1,4 @@
-/* $Id: m_xform.h,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
+/* $Id: m_xform.h,v 1.3 2000/12/26 05:09:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -75,8 +75,8 @@ do { \
extern void gl_transform_vector( GLfloat u[4],
- const GLfloat v[4],
- const GLfloat m[16] );
+ CONST GLfloat v[4],
+ CONST GLfloat m[16] );
extern void
@@ -132,37 +132,36 @@ _math_init_transformation( void );
#define CLIP_NEAR_BIT 0x10
#define CLIP_FAR_BIT 0x20
#define CLIP_USER_BIT 0x40
-#define CLIP_CULLED_BIT 0x80 /* Vertex has been culled */
#define CLIP_ALL_BITS 0x3f
typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip,
- GLvector4f *vProj,
- GLubyte clipMask[],
- GLubyte *orMask,
- GLubyte *andMask );
+ GLvector4f *vProj,
+ GLubyte clipMask[],
+ GLubyte *orMask,
+ GLubyte *andMask );
-typedef void (*dotprod_func)( GLvector4f *out_vec,
- GLuint elt,
- const GLvector4f *coord_vec,
- const GLfloat plane[4],
- const GLubyte mask[]);
+typedef void (*dotprod_func)( GLfloat *out,
+ GLuint out_stride,
+ CONST GLvector4f *coord_vec,
+ CONST GLfloat plane[4],
+ CONST GLubyte mask[]);
typedef void (*vec_copy_func)( GLvector4f *to,
- const GLvector4f *from,
- const GLubyte mask[]);
+ CONST GLvector4f *from,
+ CONST GLubyte mask[]);
/*
* Functions for transformation of normals in the VB.
*/
-typedef void (_NORMAPIP normal_func)( const GLmatrix *mat,
- GLfloat scale,
- const GLvector3f *in,
- const GLfloat lengths[],
- const GLubyte mask[],
- GLvector3f *dest );
+typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
+ GLfloat scale,
+ CONST GLvector3f *in,
+ CONST GLfloat lengths[],
+ CONST GLubyte mask[],
+ GLvector3f *dest );
/* Flags for selecting a normal transformation function.
@@ -181,26 +180,27 @@ typedef void (_NORMAPIP normal_func)( const GLmatrix *mat,
* parameter, to allow a unified interface.
*/
typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec,
- const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *clipmask,
- const GLubyte flag );
+ CONST GLfloat m[16],
+ CONST GLvector4f *from_vec,
+ CONST GLubyte *clipmask,
+ CONST GLubyte flag );
extern GLvector4f *gl_project_points( GLvector4f *to,
- const GLvector4f *from );
+ CONST GLvector4f *from );
extern void gl_transform_bounds3( GLubyte *orMask, GLubyte *andMask,
- const GLfloat m[16],
- CONST GLfloat src[][3] );
+ CONST GLfloat m[16],
+ CONST GLfloat src[][3] );
extern void gl_transform_bounds2( GLubyte *orMask, GLubyte *andMask,
- const GLfloat m[16],
- CONST GLfloat src[][3] );
+ CONST GLfloat m[16],
+ CONST GLfloat src[][3] );
extern dotprod_func gl_dotprod_tab[2][5];
extern vec_copy_func gl_copy_tab[2][0x10];
+extern vec_copy_func gl_copy_clean_tab[2][5];
extern clip_func gl_clip_tab[5];
extern normal_func gl_normal_tab[0xf][0x4];
@@ -210,17 +210,13 @@ extern normal_func gl_normal_tab[0xf][0x4];
extern transform_func **(gl_transform_tab[2]);
-extern void gl_transform_point_sz( GLfloat Q[4], const GLfloat M[16],
- const GLfloat P[4], GLuint sz );
+extern void gl_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16],
+ CONST GLfloat P[4], GLuint sz );
#define TransformRaw( to, mat, from ) \
( (*gl_transform_tab[0][(from)->size][(mat)->type])( to, (mat)->m, from, 0, 0 ), \
(to) )
-#define Transform( to, mat, from, mask, cull ) \
- ( (*gl_transform_tab[cull!=0][(from)->size][(mat)->type])( to, (mat)->m, from, mask, cull ), \
- (to) )
-
#endif