summaryrefslogtreecommitdiff
path: root/src/mesa/math/m_debug_norm.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-01-05 20:51:12 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-01-05 20:51:12 +0000
commitbd1a9dacf6a45e6aa6954eeb490d55ebcc80ace8 (patch)
treec29ed617f5b523b4f631ce87dbe053167d1713fa /src/mesa/math/m_debug_norm.c
parentca209ae1f95760bef87a10bca031bdbd6fb3ac3c (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/m_debug_norm.c')
-rw-r--r--src/mesa/math/m_debug_norm.c52
1 files changed, 26 insertions, 26 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 ) {