summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-04-23 17:58:06 +0000
committerBrian Paul <[email protected]>2004-04-23 17:58:06 +0000
commitf2f33507748260fe766742a0ed8b02c49d548bd8 (patch)
treed82d4788eeb92b9543ff65d0db87ef5ed9c6b4e9 /src/mesa/main
parent948dff8932ff52eb90ebd86b24ebb926fd2620f3 (diff)
GL_DOUBLE doesn't follow GL_FLOAT, fix indexing (Keith Harrison)
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_arrayelt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index b375828d03a..8e1d17d503a 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -60,9 +60,9 @@ typedef struct {
/*
* Convert GL_BYTE, GL_UNSIGNED_BYTE, .. GL_DOUBLE into an integer
* in the range [0, 7]. Luckily these type tokens are sequentially
- * numbered in gl.h
+ * numbered in gl.h, except for GL_DOUBLE.
*/
-#define TYPE_IDX(t) ((t) & 0xf)
+#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
static array_func ColorFuncs[2][8] = {