From: Brian Paul Date: Fri, 31 Mar 2000 01:04:52 +0000 (+0000) Subject: separate R/G/B/A accum buffer size fields X-Git-Tag: 062012170305~28221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2123080b51f4a242bf1d73a8e566b9abb202897;p=profile%2Fivi%2Fmesa.git separate R/G/B/A accum buffer size fields --- diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index ee32c92..17e37f0 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 4fd83db..136d896 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] );