summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-10 16:27:51 +0000
committerBrian Paul <[email protected]>2005-09-10 16:27:51 +0000
commit5704b8e57a0c618ddf51502e99e9dbd48cc3e685 (patch)
treed133a0a623560867c44c47bbe6baa01eb7ff80d6
parentf15b499cfd575ad8ace74d6b9047ecb1266bf7ef (diff)
fix a problem w/ color index mode when CHAN_BITS=16
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 16e9073ad78..c12a23b51ba 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -294,7 +294,7 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
#define SPAN_VARS \
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = osmesa->rowaddr[Y] + (X)
+ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + (X)
#define INC_PIXEL_PTR(P) P += 1
#define STORE_PIXEL(DST, X, Y, VALUE) \
*DST = VALUE[0]
@@ -1039,7 +1039,7 @@ compute_row_addresses( OSMesaContext ctx )
if (ctx->format == OSMESA_COLOR_INDEX) {
/* CI mode */
- bytesPerPixel = 1 * sizeof(GLchan);
+ bytesPerPixel = 1 * sizeof(GLubyte);
}
else if ((ctx->format == OSMESA_RGB) || (ctx->format == OSMESA_BGR)) {
/* RGB mode */