summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/rastpos.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-02-24 18:58:38 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-03-03 12:37:04 -0800
commit22a96f305898b5d1aa26809c7156a01686eb9bf0 (patch)
treea6a863d1bd28f639f92467364d4d4687f4367413 /src/mesa/main/rastpos.c
parentfcf438e9e03f6e75bca4a49ad372fe7c4b1abbf8 (diff)
downloadexternal_mesa3d-22a96f305898b5d1aa26809c7156a01686eb9bf0.zip
external_mesa3d-22a96f305898b5d1aa26809c7156a01686eb9bf0.tar.gz
external_mesa3d-22a96f305898b5d1aa26809c7156a01686eb9bf0.tar.bz2
mesa: Remove checks of Visual.rgbMode
This must always be true now, so there is no reason to check it. Ever. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/rastpos.c')
-rw-r--r--src/mesa/main/rastpos.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index d72b846..03ff3b6 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -246,28 +246,22 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
ctx->Current.RasterDistance = 0.0;
/* raster color = current color or index */
- if (ctx->Visual.rgbMode) {
- ctx->Current.RasterColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
- ctx->Current.RasterColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
- ctx->Current.RasterColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
- ctx->Current.RasterColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
- }
- else {
- ctx->Current.RasterIndex
- = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
- }
+ ctx->Current.RasterColor[0]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
+ ctx->Current.RasterColor[1]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
+ ctx->Current.RasterColor[2]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
+ ctx->Current.RasterColor[3]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[0]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[1]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[2]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[3]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
/* raster texcoord = current texcoord */
{