diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-01-05 20:51:12 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-01-05 20:51:12 +0000 |
commit | bd1a9dacf6a45e6aa6954eeb490d55ebcc80ace8 (patch) | |
tree | c29ed617f5b523b4f631ce87dbe053167d1713fa /src/mesa/math | |
parent | ca209ae1f95760bef87a10bca031bdbd6fb3ac3c (diff) |
Vertex program checkpoint commit: converted all vertex attributes (color,
normal, texcoords, fogcoord, secondary color, etc) to GLfloat[4] datatype.
Aliasing of glVertex, glNormal, glColor, glFogCoord, etc. to glVertexAttrib
now complete.
Diffstat (limited to 'src/mesa/math')
-rw-r--r-- | src/mesa/math/m_debug_norm.c | 52 | ||||
-rw-r--r-- | src/mesa/math/m_norm_tmp.h | 50 | ||||
-rw-r--r-- | src/mesa/math/m_xform.h | 6 |
3 files changed, 54 insertions, 54 deletions
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c index f1b702f02c..392e7c6bfd 100644 --- a/src/mesa/math/m_debug_norm.c +++ b/src/mesa/math/m_debug_norm.c @@ -1,10 +1,10 @@ -/* $Id: m_debug_norm.c,v 1.7 2001/03/30 14:44:43 gareth Exp $ */ +/* $Id: m_debug_norm.c,v 1.8 2002/01/05 20:51:12 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -119,14 +119,14 @@ static char *norm_strings[8] = { static void ref_norm_transform_rescale( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { GLuint i; const GLfloat *s = in->start; const GLfloat *m = mat->inv; - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4]) dest->start; (void) lengths; @@ -142,14 +142,14 @@ static void ref_norm_transform_rescale( const GLmatrix *mat, static void ref_norm_transform_normalize( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { GLuint i; const GLfloat *s = in->start; const GLfloat *m = mat->inv; - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4]) dest->start; for ( i = 0 ; i < in->count ; i++ ) { GLfloat t[3]; @@ -183,10 +183,10 @@ static void ref_norm_transform_normalize( const GLmatrix *mat, static int test_norm_function( normal_func func, int mtype, long *cycles ) { - GLvector3f source[1], dest[1], dest2[1], ref[1], ref2[1]; + GLvector4f source[1], dest[1], dest2[1], ref[1], ref2[1]; GLmatrix mat[1]; - GLfloat s[TEST_COUNT][5], d[TEST_COUNT][3], r[TEST_COUNT][3]; - GLfloat d2[TEST_COUNT][3], r2[TEST_COUNT][3], length[TEST_COUNT]; + GLfloat s[TEST_COUNT][5], d[TEST_COUNT][4], r[TEST_COUNT][4]; + GLfloat d2[TEST_COUNT][4], r2[TEST_COUNT][4], length[TEST_COUNT]; GLfloat scale; GLfloat *m; int i, j; @@ -232,34 +232,34 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) length[i] = 1 / sqrt( LEN_SQUARED_3FV( s[i] ) ); } - source->data = (GLfloat(*)[3])s; - source->start = (GLfloat *)s; + source->data = (GLfloat(*)[4]) s; + source->start = (GLfloat *) s; source->count = TEST_COUNT; source->stride = sizeof(s[0]); source->flags = 0; - dest->data = (GLfloat(*)[3])d; - dest->start = (GLfloat *)d; + dest->data = d; + dest->start = (GLfloat *) d; dest->count = TEST_COUNT; - dest->stride = sizeof(float[3]); + dest->stride = sizeof(float[4]); dest->flags = 0; - dest2->data = (GLfloat(*)[3])d2; - dest2->start = (GLfloat *)d2; + dest2->data = d2; + dest2->start = (GLfloat *) d2; dest2->count = TEST_COUNT; - dest2->stride = sizeof(float[3]); + dest2->stride = sizeof(float[4]); dest2->flags = 0; - ref->data = (GLfloat(*)[3])r; - ref->start = (GLfloat *)r; + ref->data = r; + ref->start = (GLfloat *) r; ref->count = TEST_COUNT; - ref->stride = sizeof(float[3]); + ref->stride = sizeof(float[4]); ref->flags = 0; - ref2->data = (GLfloat(*)[3])r2; - ref2->start = (GLfloat *)r2; + ref2->data = r2; + ref2->start = (GLfloat *) r2; ref2->count = TEST_COUNT; - ref2->stride = sizeof(float[3]); + ref2->stride = sizeof(float[4]); ref2->flags = 0; if ( norm_normalize_types[mtype] == 0 ) { diff --git a/src/mesa/math/m_norm_tmp.h b/src/mesa/math/m_norm_tmp.h index c0d6fac96b..767d1feddf 100644 --- a/src/mesa/math/m_norm_tmp.h +++ b/src/mesa/math/m_norm_tmp.h @@ -1,4 +1,4 @@ -/* $Id: m_norm_tmp.h,v 1.9 2002/01/05 14:12:24 brianp Exp $ */ +/* $Id: m_norm_tmp.h,v 1.10 2002/01/05 20:51:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -47,11 +47,11 @@ static void _XFORMAPI TAG(transform_normalize_normals)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -114,11 +114,11 @@ TAG(transform_normalize_normals)( const GLmatrix *mat, static void _XFORMAPI TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -179,11 +179,11 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat, static void _XFORMAPI TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -208,11 +208,11 @@ TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat, static void _XFORMAPI TAG(transform_rescale_normals)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -240,11 +240,11 @@ TAG(transform_rescale_normals)( const GLmatrix *mat, static void _XFORMAPI TAG(transform_normals_no_rot)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -270,11 +270,11 @@ TAG(transform_normals_no_rot)( const GLmatrix *mat, static void _XFORMAPI TAG(transform_normals)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -300,11 +300,11 @@ TAG(transform_normals)( const GLmatrix *mat, static void _XFORMAPI TAG(normalize_normals)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; @@ -346,11 +346,11 @@ TAG(normalize_normals)( const GLmatrix *mat, static void _XFORMAPI TAG(rescale_normals)( const GLmatrix *mat, GLfloat scale, - const GLvector3f *in, + const GLvector4f *in, const GLfloat *lengths, - GLvector3f *dest ) + GLvector4f *dest ) { - GLfloat (*out)[3] = (GLfloat (*)[3])dest->start; + GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; const GLfloat *from = in->start; const GLuint stride = in->stride; const GLuint count = in->count; diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h index f871783c16..5d94b5151b 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.10 2001/03/30 14:44:43 gareth Exp $ */ +/* $Id: m_xform.h,v 1.11 2002/01/05 20:51:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -155,9 +155,9 @@ typedef void (*vec_copy_func)( GLvector4f *to, */ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat, GLfloat scale, - CONST GLvector3f *in, + CONST GLvector4f *in, CONST GLfloat lengths[], - GLvector3f *dest ); + GLvector4f *dest ); /* Flags for selecting a normal transformation function. |