summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-03-31 01:04:52 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-03-31 01:04:52 +0000
commitf2123080b51f4a242bf1d73a8e566b9abb202897 (patch)
tree90033480842b16c08ac9b195afdbd6bf7ccaa6c3 /src/mesa
parenta5724069f146e840795f1884e7230ff3882bcdb6 (diff)
separate R/G/B/A accum buffer size fields
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/accum.c6
-rw-r--r--src/mesa/main/get.c34
2 files changed, 32 insertions, 8 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index ee32c92206..17e37f08e3 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,4 +1,4 @@
-/* $Id: accum.c,v 1.17 2000/03/19 01:10:11 brianp Exp $ */
+/* $Id: accum.c,v 1.18 2000/03/31 01:04:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -145,7 +145,7 @@ _mesa_Accum( GLenum op, GLfloat value )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glAccum");
- if (ctx->Visual->AccumBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) {
+ if (ctx->Visual->AccumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) {
gl_error(ctx, GL_INVALID_OPERATION, "glAccum");
return;
}
@@ -427,7 +427,7 @@ _mesa_clear_accum_buffer( GLcontext *ctx )
GLuint buffersize;
GLfloat acc_scale;
- if (ctx->Visual->AccumBits==0) {
+ if (ctx->Visual->AccumRedBits==0) {
/* No accumulation buffer! */
return;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 4fd83dbd38..136d89689a 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.15 2000/03/11 23:23:26 brianp Exp $ */
+/* $Id: get.c,v 1.16 2000/03/31 01:04:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -75,10 +75,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
+ *params = INT_TO_BOOL(ctx->Visual->AccumRedBits);
+ break;
case GL_ACCUM_GREEN_BITS:
+ *params = INT_TO_BOOL(ctx->Visual->AccumGreenBits);
+ break;
case GL_ACCUM_BLUE_BITS:
+ *params = INT_TO_BOOL(ctx->Visual->AccumBlueBits);
+ break;
case GL_ACCUM_ALPHA_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AccumBits);
+ *params = INT_TO_BOOL(ctx->Visual->AccumAlphaBits);
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[0]);
@@ -1055,10 +1061,16 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
+ *params = (GLdouble) ctx->Visual->AccumRedBits;
+ break;
case GL_ACCUM_GREEN_BITS:
+ *params = (GLdouble) ctx->Visual->AccumGreenBits;
+ break;
case GL_ACCUM_BLUE_BITS:
+ *params = (GLdouble) ctx->Visual->AccumBlueBits;
+ break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLdouble) ctx->Visual->AccumBits;
+ *params = (GLdouble) ctx->Visual->AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = (GLdouble) ctx->Accum.ClearColor[0];
@@ -2036,10 +2048,16 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
+ *params = (GLfloat) ctx->Visual->AccumRedBits;
+ break;
case GL_ACCUM_GREEN_BITS:
+ *params = (GLfloat) ctx->Visual->AccumGreenBits;
+ break;
case GL_ACCUM_BLUE_BITS:
+ *params = (GLfloat) ctx->Visual->AccumBlueBits;
+ break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLfloat) ctx->Visual->AccumBits;
+ *params = (GLfloat) ctx->Visual->AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = ctx->Accum.ClearColor[0];
@@ -2994,10 +3012,16 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
+ *params = (GLint) ctx->Visual->AccumRedBits;
+ break;
case GL_ACCUM_GREEN_BITS:
+ *params = (GLint) ctx->Visual->AccumGreenBits;
+ break;
case GL_ACCUM_BLUE_BITS:
+ *params = (GLint) ctx->Visual->AccumBlueBits;
+ break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLint) ctx->Visual->AccumBits;
+ *params = (GLint) ctx->Visual->AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_INT( ctx->Accum.ClearColor[0] );