From 1e4731f6443a6efdfc4e425977490ddd5387caa3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Mar 2004 16:58:26 +0000 Subject: Fix color index mode rendering. Changed SWvertex's index field to GLfloat and fix a few other bits. --- src/mesa/swrast/s_aaline.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/mesa/swrast/s_aaline.c') diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c index bbdc92b92a..39c51a50f7 100644 --- a/src/mesa/swrast/s_aaline.c +++ b/src/mesa/swrast/s_aaline.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.0.3 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 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"), @@ -331,6 +331,19 @@ compute_coveragef(const struct LineInfo *info, } +/** + * Compute coverage value for color index mode. + * XXX this may not be quite correct. + * \return coverage in [0,15]. + */ +static GLfloat +compute_coveragei(const struct LineInfo *info, + GLint winx, GLint winy) +{ + return compute_coveragef(info, winx, winy) * 15.0F; +} + + typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line, int ix, int iy); -- cgit v1.2.3