summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-09-26 20:53:53 +0000
committerBrian Paul <[email protected]>2000-09-26 20:53:53 +0000
commitb1394fa92aaaf859ce9efc8b5fc194397921320c (patch)
tree48612380d5f16b24deacf643e127fc1b319fbc18 /src/mesa/main/get.c
parent3b18a36f210da9d66acd1228d24948cd77c2e81e (diff)
First batch of OpenGL SI related changes:
Renamed struct gl_context to struct __GLcontextRec. Include glcore.h, setup GL imports/exports. Replaced gl_ prefix with _mesa_ prefix in context.[ch] functions. GLcontext's Visual field is no longer a pointer.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 69deced9153..d10beda7787 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.33 2000/09/15 19:57:51 brianp Exp $ */
+/* $Id: get.c,v 1.34 2000/09/26 20:53:53 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -104,16 +104,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AccumRedBits);
+ *params = INT_TO_BOOL(ctx->Visual.AccumRedBits);
break;
case GL_ACCUM_GREEN_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AccumGreenBits);
+ *params = INT_TO_BOOL(ctx->Visual.AccumGreenBits);
break;
case GL_ACCUM_BLUE_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AccumBlueBits);
+ *params = INT_TO_BOOL(ctx->Visual.AccumBlueBits);
break;
case GL_ACCUM_ALPHA_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AccumAlphaBits);
+ *params = INT_TO_BOOL(ctx->Visual.AccumAlphaBits);
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[0]);
@@ -125,7 +125,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(ctx->Pixel.AlphaBias);
break;
case GL_ALPHA_BITS:
- *params = INT_TO_BOOL(ctx->Visual->AlphaBits);
+ *params = INT_TO_BOOL(ctx->Visual.AlphaBits);
break;
case GL_ALPHA_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.AlphaScale);
@@ -182,7 +182,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(ctx->Pixel.BlueBias);
break;
case GL_BLUE_BITS:
- *params = INT_TO_BOOL( ctx->Visual->BlueBits );
+ *params = INT_TO_BOOL( ctx->Visual.BlueBits );
break;
case GL_BLUE_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.BlueScale);
@@ -276,7 +276,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(ctx->Pixel.DepthBias);
break;
case GL_DEPTH_BITS:
- *params = INT_TO_BOOL(ctx->Visual->DepthBits);
+ *params = INT_TO_BOOL(ctx->Visual.DepthBits);
break;
case GL_DEPTH_CLEAR_VALUE:
*params = FLOAT_TO_BOOL(ctx->Depth.Clear);
@@ -301,7 +301,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = ctx->Color.DitherFlag;
break;
case GL_DOUBLEBUFFER:
- *params = ctx->Visual->DBflag;
+ *params = ctx->Visual.DBflag;
break;
case GL_DRAW_BUFFER:
*params = ENUM_TO_BOOL(ctx->Color.DrawBuffer);
@@ -349,7 +349,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(ctx->Pixel.GreenBias);
break;
case GL_GREEN_BITS:
- *params = INT_TO_BOOL( ctx->Visual->GreenBits );
+ *params = INT_TO_BOOL( ctx->Visual.GreenBits );
break;
case GL_GREEN_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale);
@@ -364,13 +364,13 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
}
break;
case GL_INDEX_BITS:
- *params = INT_TO_BOOL( ctx->Visual->IndexBits );
+ *params = INT_TO_BOOL( ctx->Visual.IndexBits );
break;
case GL_INDEX_CLEAR_VALUE:
*params = INT_TO_BOOL(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
- *params = ctx->Visual->RGBAflag ? GL_FALSE : GL_TRUE;
+ *params = ctx->Visual.RGBAflag ? GL_FALSE : GL_TRUE;
break;
case GL_INDEX_OFFSET:
*params = INT_TO_BOOL(ctx->Pixel.IndexOffset);
@@ -729,7 +729,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(ctx->Pixel.RedBias);
break;
case GL_RED_BITS:
- *params = INT_TO_BOOL( ctx->Visual->RedBits );
+ *params = INT_TO_BOOL( ctx->Visual.RedBits );
break;
case GL_RED_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.RedScale);
@@ -738,7 +738,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = ENUM_TO_BOOL(ctx->RenderMode);
break;
case GL_RGBA_MODE:
- *params = ctx->Visual->RGBAflag;
+ *params = ctx->Visual.RGBAflag;
break;
case GL_SCISSOR_BOX:
params[0] = INT_TO_BOOL(ctx->Scissor.X);
@@ -759,7 +759,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = ctx->Texture.SharedPalette;
break;
case GL_STENCIL_BITS:
- *params = INT_TO_BOOL(ctx->Visual->StencilBits);
+ *params = INT_TO_BOOL(ctx->Visual.StencilBits);
break;
case GL_STENCIL_CLEAR_VALUE:
*params = INT_TO_BOOL(ctx->Stencil.Clear);
@@ -789,7 +789,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = INT_TO_BOOL(ctx->Stencil.WriteMask);
break;
case GL_STEREO:
- *params = ctx->Visual->StereoFlag;
+ *params = ctx->Visual.StereoFlag;
break;
case GL_SUBPIXEL_BITS:
*params = INT_TO_BOOL(ctx->Const.SubPixelBits);
@@ -1259,16 +1259,16 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- *params = (GLdouble) ctx->Visual->AccumRedBits;
+ *params = (GLdouble) ctx->Visual.AccumRedBits;
break;
case GL_ACCUM_GREEN_BITS:
- *params = (GLdouble) ctx->Visual->AccumGreenBits;
+ *params = (GLdouble) ctx->Visual.AccumGreenBits;
break;
case GL_ACCUM_BLUE_BITS:
- *params = (GLdouble) ctx->Visual->AccumBlueBits;
+ *params = (GLdouble) ctx->Visual.AccumBlueBits;
break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLdouble) ctx->Visual->AccumAlphaBits;
+ *params = (GLdouble) ctx->Visual.AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = (GLdouble) ctx->Accum.ClearColor[0];
@@ -1280,7 +1280,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.AlphaBias;
break;
case GL_ALPHA_BITS:
- *params = (GLdouble) ctx->Visual->AlphaBits;
+ *params = (GLdouble) ctx->Visual.AlphaBits;
break;
case GL_ALPHA_SCALE:
*params = (GLdouble) ctx->Pixel.AlphaScale;
@@ -1337,7 +1337,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.BlueBias;
break;
case GL_BLUE_BITS:
- *params = (GLdouble) ctx->Visual->BlueBits;
+ *params = (GLdouble) ctx->Visual.BlueBits;
break;
case GL_BLUE_SCALE:
*params = (GLdouble) ctx->Pixel.BlueScale;
@@ -1431,7 +1431,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.DepthBias;
break;
case GL_DEPTH_BITS:
- *params = (GLdouble) ctx->Visual->DepthBits;
+ *params = (GLdouble) ctx->Visual.DepthBits;
break;
case GL_DEPTH_CLEAR_VALUE:
*params = (GLdouble) ctx->Depth.Clear;
@@ -1456,7 +1456,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Color.DitherFlag;
break;
case GL_DOUBLEBUFFER:
- *params = (GLdouble) ctx->Visual->DBflag;
+ *params = (GLdouble) ctx->Visual.DBflag;
break;
case GL_DRAW_BUFFER:
*params = ENUM_TO_DOUBLE(ctx->Color.DrawBuffer);
@@ -1504,7 +1504,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.GreenBias;
break;
case GL_GREEN_BITS:
- *params = (GLdouble) ctx->Visual->GreenBits;
+ *params = (GLdouble) ctx->Visual.GreenBits;
break;
case GL_GREEN_SCALE:
*params = (GLdouble) ctx->Pixel.GreenScale;
@@ -1519,13 +1519,13 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
}
break;
case GL_INDEX_BITS:
- *params = (GLdouble) ctx->Visual->IndexBits;
+ *params = (GLdouble) ctx->Visual.IndexBits;
break;
case GL_INDEX_CLEAR_VALUE:
*params = (GLdouble) ctx->Color.ClearIndex;
break;
case GL_INDEX_MODE:
- *params = ctx->Visual->RGBAflag ? 0.0 : 1.0;
+ *params = ctx->Visual.RGBAflag ? 0.0 : 1.0;
break;
case GL_INDEX_OFFSET:
*params = (GLdouble) ctx->Pixel.IndexOffset;
@@ -1884,7 +1884,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.RedBias;
break;
case GL_RED_BITS:
- *params = (GLdouble) ctx->Visual->RedBits;
+ *params = (GLdouble) ctx->Visual.RedBits;
break;
case GL_RED_SCALE:
*params = (GLdouble) ctx->Pixel.RedScale;
@@ -1893,7 +1893,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = ENUM_TO_DOUBLE(ctx->RenderMode);
break;
case GL_RGBA_MODE:
- *params = (GLdouble) ctx->Visual->RGBAflag;
+ *params = (GLdouble) ctx->Visual.RGBAflag;
break;
case GL_SCISSOR_BOX:
params[0] = (GLdouble) ctx->Scissor.X;
@@ -1914,7 +1914,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Texture.SharedPalette;
break;
case GL_STENCIL_BITS:
- *params = (GLdouble) ctx->Visual->StencilBits;
+ *params = (GLdouble) ctx->Visual.StencilBits;
break;
case GL_STENCIL_CLEAR_VALUE:
*params = (GLdouble) ctx->Stencil.Clear;
@@ -1944,7 +1944,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Stencil.WriteMask;
break;
case GL_STEREO:
- *params = (GLdouble) ctx->Visual->StereoFlag;
+ *params = (GLdouble) ctx->Visual.StereoFlag;
break;
case GL_SUBPIXEL_BITS:
*params = (GLdouble) ctx->Const.SubPixelBits;
@@ -2414,16 +2414,16 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- *params = (GLfloat) ctx->Visual->AccumRedBits;
+ *params = (GLfloat) ctx->Visual.AccumRedBits;
break;
case GL_ACCUM_GREEN_BITS:
- *params = (GLfloat) ctx->Visual->AccumGreenBits;
+ *params = (GLfloat) ctx->Visual.AccumGreenBits;
break;
case GL_ACCUM_BLUE_BITS:
- *params = (GLfloat) ctx->Visual->AccumBlueBits;
+ *params = (GLfloat) ctx->Visual.AccumBlueBits;
break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLfloat) ctx->Visual->AccumAlphaBits;
+ *params = (GLfloat) ctx->Visual.AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = ctx->Accum.ClearColor[0];
@@ -2435,7 +2435,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = ctx->Pixel.AlphaBias;
break;
case GL_ALPHA_BITS:
- *params = (GLfloat) ctx->Visual->AlphaBits;
+ *params = (GLfloat) ctx->Visual.AlphaBits;
break;
case GL_ALPHA_SCALE:
*params = ctx->Pixel.AlphaScale;
@@ -2492,7 +2492,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = ctx->Pixel.BlueBias;
break;
case GL_BLUE_BITS:
- *params = (GLfloat) ctx->Visual->BlueBits;
+ *params = (GLfloat) ctx->Visual.BlueBits;
break;
case GL_BLUE_SCALE:
*params = ctx->Pixel.BlueScale;
@@ -2583,7 +2583,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Pixel.DepthBias;
break;
case GL_DEPTH_BITS:
- *params = (GLfloat) ctx->Visual->DepthBits;
+ *params = (GLfloat) ctx->Visual.DepthBits;
break;
case GL_DEPTH_CLEAR_VALUE:
*params = (GLfloat) ctx->Depth.Clear;
@@ -2608,7 +2608,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Color.DitherFlag;
break;
case GL_DOUBLEBUFFER:
- *params = (GLfloat) ctx->Visual->DBflag;
+ *params = (GLfloat) ctx->Visual.DBflag;
break;
case GL_DRAW_BUFFER:
*params = ENUM_TO_FLOAT(ctx->Color.DrawBuffer);
@@ -2656,7 +2656,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Pixel.GreenBias;
break;
case GL_GREEN_BITS:
- *params = (GLfloat) ctx->Visual->GreenBits;
+ *params = (GLfloat) ctx->Visual.GreenBits;
break;
case GL_GREEN_SCALE:
*params = (GLfloat) ctx->Pixel.GreenScale;
@@ -2671,13 +2671,13 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
}
break;
case GL_INDEX_BITS:
- *params = (GLfloat) ctx->Visual->IndexBits;
+ *params = (GLfloat) ctx->Visual.IndexBits;
break;
case GL_INDEX_CLEAR_VALUE:
*params = (GLfloat) ctx->Color.ClearIndex;
break;
case GL_INDEX_MODE:
- *params = ctx->Visual->RGBAflag ? 0.0F : 1.0F;
+ *params = ctx->Visual.RGBAflag ? 0.0F : 1.0F;
break;
case GL_INDEX_OFFSET:
*params = (GLfloat) ctx->Pixel.IndexOffset;
@@ -3038,7 +3038,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = ctx->Pixel.RedBias;
break;
case GL_RED_BITS:
- *params = (GLfloat) ctx->Visual->RedBits;
+ *params = (GLfloat) ctx->Visual.RedBits;
break;
case GL_RED_SCALE:
*params = ctx->Pixel.RedScale;
@@ -3047,7 +3047,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = ENUM_TO_FLOAT(ctx->RenderMode);
break;
case GL_RGBA_MODE:
- *params = (GLfloat) ctx->Visual->RGBAflag;
+ *params = (GLfloat) ctx->Visual.RGBAflag;
break;
case GL_SCISSOR_BOX:
params[0] = (GLfloat) ctx->Scissor.X;
@@ -3068,7 +3068,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Texture.SharedPalette;
break;
case GL_STENCIL_BITS:
- *params = (GLfloat) ctx->Visual->StencilBits;
+ *params = (GLfloat) ctx->Visual.StencilBits;
break;
case GL_STENCIL_CLEAR_VALUE:
*params = (GLfloat) ctx->Stencil.Clear;
@@ -3098,7 +3098,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Stencil.WriteMask;
break;
case GL_STEREO:
- *params = (GLfloat) ctx->Visual->StereoFlag;
+ *params = (GLfloat) ctx->Visual.StereoFlag;
break;
case GL_SUBPIXEL_BITS:
*params = (GLfloat) ctx->Const.SubPixelBits;
@@ -3541,16 +3541,16 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- *params = (GLint) ctx->Visual->AccumRedBits;
+ *params = (GLint) ctx->Visual.AccumRedBits;
break;
case GL_ACCUM_GREEN_BITS:
- *params = (GLint) ctx->Visual->AccumGreenBits;
+ *params = (GLint) ctx->Visual.AccumGreenBits;
break;
case GL_ACCUM_BLUE_BITS:
- *params = (GLint) ctx->Visual->AccumBlueBits;
+ *params = (GLint) ctx->Visual.AccumBlueBits;
break;
case GL_ACCUM_ALPHA_BITS:
- *params = (GLint) ctx->Visual->AccumAlphaBits;
+ *params = (GLint) ctx->Visual.AccumAlphaBits;
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_INT( ctx->Accum.ClearColor[0] );
@@ -3562,7 +3562,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Pixel.AlphaBias;
break;
case GL_ALPHA_BITS:
- *params = ctx->Visual->AlphaBits;
+ *params = ctx->Visual.AlphaBits;
break;
case GL_ALPHA_SCALE:
*params = (GLint) ctx->Pixel.AlphaScale;
@@ -3619,7 +3619,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Pixel.BlueBias;
break;
case GL_BLUE_BITS:
- *params = (GLint) ctx->Visual->BlueBits;
+ *params = (GLint) ctx->Visual.BlueBits;
break;
case GL_BLUE_SCALE:
*params = (GLint) ctx->Pixel.BlueScale;
@@ -3714,7 +3714,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Pixel.DepthBias;
break;
case GL_DEPTH_BITS:
- *params = ctx->Visual->DepthBits;
+ *params = ctx->Visual.DepthBits;
break;
case GL_DEPTH_CLEAR_VALUE:
*params = (GLint) ctx->Depth.Clear;
@@ -3739,7 +3739,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Color.DitherFlag;
break;
case GL_DOUBLEBUFFER:
- *params = (GLint) ctx->Visual->DBflag;
+ *params = (GLint) ctx->Visual.DBflag;
break;
case GL_DRAW_BUFFER:
*params = (GLint) ctx->Color.DrawBuffer;
@@ -3787,7 +3787,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Pixel.GreenBias;
break;
case GL_GREEN_BITS:
- *params = (GLint) ctx->Visual->GreenBits;
+ *params = (GLint) ctx->Visual.GreenBits;
break;
case GL_GREEN_SCALE:
*params = (GLint) ctx->Pixel.GreenScale;
@@ -3802,13 +3802,13 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
}
break;
case GL_INDEX_BITS:
- *params = (GLint) ctx->Visual->IndexBits;
+ *params = (GLint) ctx->Visual.IndexBits;
break;
case GL_INDEX_CLEAR_VALUE:
*params = (GLint) ctx->Color.ClearIndex;
break;
case GL_INDEX_MODE:
- *params = ctx->Visual->RGBAflag ? 0 : 1;
+ *params = ctx->Visual.RGBAflag ? 0 : 1;
break;
case GL_INDEX_OFFSET:
*params = ctx->Pixel.IndexOffset;
@@ -4167,7 +4167,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Pixel.RedBias;
break;
case GL_RED_BITS:
- *params = (GLint) ctx->Visual->RedBits;
+ *params = (GLint) ctx->Visual.RedBits;
break;
case GL_RED_SCALE:
*params = (GLint) ctx->Pixel.RedScale;
@@ -4176,7 +4176,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->RenderMode;
break;
case GL_RGBA_MODE:
- *params = (GLint) ctx->Visual->RGBAflag;
+ *params = (GLint) ctx->Visual.RGBAflag;
break;
case GL_SCISSOR_BOX:
params[0] = (GLint) ctx->Scissor.X;
@@ -4197,7 +4197,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Texture.SharedPalette;
break;
case GL_STENCIL_BITS:
- *params = ctx->Visual->StencilBits;
+ *params = ctx->Visual.StencilBits;
break;
case GL_STENCIL_CLEAR_VALUE:
*params = (GLint) ctx->Stencil.Clear;
@@ -4227,7 +4227,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = (GLint) ctx->Stencil.WriteMask;
break;
case GL_STEREO:
- *params = (GLint) ctx->Visual->StereoFlag;
+ *params = (GLint) ctx->Visual.StereoFlag;
break;
case GL_SUBPIXEL_BITS:
*params = ctx->Const.SubPixelBits;