summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-11-25 22:45:59 +0000
committerBrian Paul <[email protected]>2003-11-25 22:45:59 +0000
commit0f3cd3f894612d156de454178effa4c732f96da7 (patch)
tree429ee71c2a0153eb471c8ab9795d15757b304908 /src/mesa
parent7df4f95314a91afe92ca7d1eb0effa1dda7ac844 (diff)
current raster color index should be GLfloat
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/feedback.c8
-rw-r--r--src/mesa/main/feedback.h2
-rw-r--r--src/mesa/main/get.c2
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/main/rastpos.c10
-rw-r--r--src/mesa/swrast/s_bitmap.c4
-rw-r--r--src/mesa/swrast/s_span.c2
7 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index 106f34300a8..69b235a3e57 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -121,10 +121,10 @@ _mesa_PassThrough( GLfloat token )
* Put a vertex into the feedback buffer.
*/
void _mesa_feedback_vertex( GLcontext *ctx,
- const GLfloat win[4],
- const GLfloat color[4],
- GLuint index,
- const GLfloat texcoord[4] )
+ const GLfloat win[4],
+ const GLfloat color[4],
+ GLfloat index,
+ const GLfloat texcoord[4] )
{
FEEDBACK_TOKEN( ctx, win[0] );
FEEDBACK_TOKEN( ctx, win[1] );
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index bbd27e3a975..6c448ad631b 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -47,7 +47,7 @@ extern void _mesa_init_feedback( GLcontext * ctx );
extern void _mesa_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
const GLfloat color[4],
- GLuint index,
+ GLfloat index,
const GLfloat texcoord[4] );
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index e2412186eab..32491d9d34c 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -3392,7 +3392,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Current.RasterDistance;
break;
case GL_CURRENT_RASTER_INDEX:
- *params = (GLfloat) ctx->Current.RasterIndex;
+ *params = ctx->Current.RasterIndex;
break;
case GL_CURRENT_RASTER_POSITION:
params[0] = ctx->Current.RasterPos[0];
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d451cc8985e..1e0a0633cd4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -454,15 +454,15 @@ struct gl_current_attrib {
/**
* \name Values are always valid.
*
- * \note BTW, note how similar this set of attributes is to the SWvertex data type
- * in the software rasterizer...
+ * \note BTW, note how similar this set of attributes is to the SWvertex
+ * data type in the software rasterizer...
*/
/*@{*/
GLfloat RasterPos[4]; /**< Current raster position */
GLfloat RasterDistance; /**< Current raster distance */
GLfloat RasterColor[4]; /**< Current raster color */
GLfloat RasterSecondaryColor[4]; /**< Current raster secondary color */
- GLuint RasterIndex; /**< Current raster index */
+ GLfloat RasterIndex; /**< Current raster index */
GLfloat RasterTexCoords[MAX_TEXTURE_UNITS][4];/**< Current raster texcoords */
GLboolean RasterPosValid; /**< Raster pos valid flag */
/*@}*/
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index fac7dbd070f..5e7ef50b46b 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -129,7 +129,7 @@ shade_rastpos(GLcontext *ctx,
const GLfloat normal[3],
GLfloat Rcolor[4],
GLfloat Rspec[4],
- GLuint *Rindex)
+ GLfloat *Rindex)
{
GLfloat (*base)[3] = ctx->Light._BaseColor;
struct gl_light *light;
@@ -274,7 +274,7 @@ shade_rastpos(GLcontext *ctx,
if (i > ind[MAT_INDEX_SPECULAR]) {
i = ind[MAT_INDEX_SPECULAR];
}
- *Rindex = (GLuint) (GLint) i;
+ *Rindex = i;
}
}
@@ -345,7 +345,7 @@ raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
ctx->Current.Attrib[VERT_ATTRIB_COLOR1]);
}
else {
- ctx->Current.RasterIndex = (GLuint) ctx->Current.Index;
+ ctx->Current.RasterIndex = ctx->Current.Index;
}
}
@@ -636,7 +636,7 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
= CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
}
else {
- ctx->Current.RasterIndex = (GLuint) ctx->Current.Index;
+ ctx->Current.RasterIndex = ctx->Current.Index;
}
/* raster texcoord = current texcoord */
@@ -872,7 +872,7 @@ void _mesa_init_rastpos( GLcontext * ctx )
ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterDistance = 0.0;
ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
- ctx->Current.RasterIndex = 1;
+ ctx->Current.RasterIndex = 1.0;
for (i=0; i<MAX_TEXTURE_UNITS; i++)
ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterPosValid = GL_TRUE;
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 0e20a20d7fb..aeacba88eac 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -72,7 +72,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
}
else {
span.interpMask |= SPAN_INDEX;
- span.index = ChanToFixed(ctx->Current.RasterIndex);
+ span.index = FloatToFixed(ctx->Current.RasterIndex);
span.indexStep = 0;
}
@@ -188,7 +188,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
}
else {
span.interpMask |= SPAN_INDEX;
- span.index = ChanToFixed(ctx->Current.RasterIndex);
+ span.index = FloatToFixed(ctx->Current.RasterIndex);
span.indexStep = 0;
}
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 013114768d2..769b551e712 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -110,7 +110,7 @@ _swrast_span_default_color( GLcontext *ctx, struct sw_span *span )
span->interpMask |= SPAN_RGBA;
}
else {
- span->index = IntToFixed(ctx->Current.RasterIndex);
+ span->index = FloatToFixed(ctx->Current.RasterIndex);
span->indexStep = 0;
span->interpMask |= SPAN_INDEX;
}