current raster color index should be GLfloat
This commit is contained in:
@@ -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] );
|
||||
|
||||
@@ -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] );
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -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];
|
||||
|
||||
@@ -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 */
|
||||
/*@}*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user