From 1e083c8c172c6107506ddbf18a94b6b772afee3e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 17 Oct 1999 22:36:35 +0000 Subject: [PATCH] added glGet cases for vertex array enable state --- src/mesa/main/get.c | 77 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 90df613cd19..25544d01263 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */ +/* $Id: get.c,v 1.5 1999/10/17 22:36:35 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -833,6 +833,9 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_ZOOM_Y: *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomY); break; + case GL_VERTEX_ARRAY: + *params = ctx->Array.Vertex.Enabled; + break; case GL_VERTEX_ARRAY_SIZE: *params = INT_TO_BOOL(ctx->Array.Vertex.Size); break; @@ -845,6 +848,9 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_VERTEX_ARRAY_COUNT_EXT: *params = INT_TO_BOOL(0); break; + case GL_NORMAL_ARRAY: + *params = ctx->Array.Normal.Enabled; + break; case GL_NORMAL_ARRAY_TYPE: *params = ENUM_TO_BOOL(ctx->Array.Normal.Type); break; @@ -854,6 +860,9 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_NORMAL_ARRAY_COUNT_EXT: *params = INT_TO_BOOL(0); break; + case GL_COLOR_ARRAY: + *params = ctx->Array.Color.Enabled; + break; case GL_COLOR_ARRAY_SIZE: *params = INT_TO_BOOL(ctx->Array.Color.Size); break; @@ -866,6 +875,9 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_COLOR_ARRAY_COUNT_EXT: *params = INT_TO_BOOL(0); break; + case GL_INDEX_ARRAY: + *params = ctx->Array.Index.Enabled; + break; case GL_INDEX_ARRAY_TYPE: *params = ENUM_TO_BOOL(ctx->Array.Index.Type); break; @@ -875,6 +887,9 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_INDEX_ARRAY_COUNT_EXT: *params = INT_TO_BOOL(0); break; + case GL_TEXTURE_COORD_ARRAY: + *params = ctx->Array.TexCoord[texUnit].Enabled; + break; case GL_TEXTURE_COORD_ARRAY_SIZE: *params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Size); break; @@ -887,12 +902,12 @@ void gl_GetBooleanv( GLcontext *ctx, GLenum pname, GLboolean *params ) case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: *params = INT_TO_BOOL(0); break; + case GL_EDGE_FLAG_ARRAY: + *params = ctx->Array.EdgeFlag.Enabled; + break; case GL_EDGE_FLAG_ARRAY_STRIDE: *params = INT_TO_BOOL(ctx->Array.EdgeFlag.Stride); break; - case GL_EDGE_FLAG_ARRAY_EXT: - *params = INT_TO_BOOL(0); - break; case GL_MAX_TEXTURE_UNITS_ARB: *params = ctx->Const.MaxTextureUnits; @@ -1727,6 +1742,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_ZOOM_Y: *params = (GLdouble) ctx->Pixel.ZoomY; break; + case GL_VERTEX_ARRAY: + *params = (GLdouble) ctx->Array.Vertex.Enabled; + break; case GL_VERTEX_ARRAY_SIZE: *params = (GLdouble) ctx->Array.Vertex.Size; break; @@ -1739,6 +1757,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_VERTEX_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_NORMAL_ARRAY: + *params = (GLdouble) ctx->Array.Normal.Enabled; + break; case GL_NORMAL_ARRAY_TYPE: *params = ENUM_TO_DOUBLE(ctx->Array.Normal.Type); break; @@ -1748,6 +1769,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_NORMAL_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_COLOR_ARRAY: + *params = (GLdouble) ctx->Array.Color.Enabled; + break; case GL_COLOR_ARRAY_SIZE: *params = (GLdouble) ctx->Array.Color.Size; break; @@ -1760,6 +1784,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_COLOR_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_INDEX_ARRAY: + *params = (GLdouble) ctx->Array.Index.Enabled; + break; case GL_INDEX_ARRAY_TYPE: *params = ENUM_TO_DOUBLE(ctx->Array.Index.Type); break; @@ -1769,6 +1796,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_INDEX_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_TEXTURE_COORD_ARRAY: + *params = (GLdouble) ctx->Array.TexCoord[texUnit].Enabled; + break; case GL_TEXTURE_COORD_ARRAY_SIZE: *params = (GLdouble) ctx->Array.TexCoord[texUnit].Size; break; @@ -1781,6 +1811,9 @@ void gl_GetDoublev( GLcontext *ctx, GLenum pname, GLdouble *params ) case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_EDGE_FLAG_ARRAY: + *params = (GLdouble) ctx->Array.EdgeFlag.Enabled; + break; case GL_EDGE_FLAG_ARRAY_STRIDE: *params = (GLdouble) ctx->Array.EdgeFlag.Stride; break; @@ -2621,6 +2654,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_ZOOM_Y: *params = (GLfloat) ctx->Pixel.ZoomY; break; + case GL_VERTEX_ARRAY: + *params = (GLfloat) ctx->Array.Vertex.Enabled; + break; case GL_VERTEX_ARRAY_SIZE: *params = (GLfloat) ctx->Array.Vertex.Size; break; @@ -2633,6 +2669,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_VERTEX_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_NORMAL_ARRAY: + *params = (GLfloat) ctx->Array.Normal.Enabled; + break; case GL_NORMAL_ARRAY_TYPE: *params = ENUM_TO_FLOAT(ctx->Array.Normal.Type); break; @@ -2642,6 +2681,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_NORMAL_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_COLOR_ARRAY: + *params = (GLfloat) ctx->Array.Color.Enabled; + break; case GL_COLOR_ARRAY_SIZE: *params = (GLfloat) ctx->Array.Color.Size; break; @@ -2654,6 +2696,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_COLOR_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_INDEX_ARRAY: + *params = (GLfloat) ctx->Array.Index.Enabled; + break; case GL_INDEX_ARRAY_TYPE: *params = ENUM_TO_FLOAT(ctx->Array.Index.Type); break; @@ -2663,6 +2708,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_INDEX_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_TEXTURE_COORD_ARRAY: + *params = (GLfloat) ctx->Array.TexCoord[texUnit].Enabled; + break; case GL_TEXTURE_COORD_ARRAY_SIZE: *params = (GLfloat) ctx->Array.TexCoord[texUnit].Size; break; @@ -2675,6 +2723,9 @@ void gl_GetFloatv( GLcontext *ctx, GLenum pname, GLfloat *params ) case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: *params = 0.0; break; + case GL_EDGE_FLAG_ARRAY: + *params = (GLfloat) ctx->Array.EdgeFlag.Enabled; + break; case GL_EDGE_FLAG_ARRAY_STRIDE: *params = (GLfloat) ctx->Array.EdgeFlag.Stride; break; @@ -3516,6 +3567,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_ZOOM_Y: *params = (GLint) ctx->Pixel.ZoomY; break; + case GL_VERTEX_ARRAY: + *params = (GLint) ctx->Array.Vertex.Enabled; + break; case GL_VERTEX_ARRAY_SIZE: *params = ctx->Array.Vertex.Size; break; @@ -3528,6 +3582,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_VERTEX_ARRAY_COUNT_EXT: *params = 0; break; + case GL_NORMAL_ARRAY: + *params = (GLint) ctx->Array.Normal.Enabled; + break; case GL_NORMAL_ARRAY_TYPE: *params = ctx->Array.Normal.Type; break; @@ -3537,6 +3594,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_NORMAL_ARRAY_COUNT_EXT: *params = 0; break; + case GL_COLOR_ARRAY: + *params = (GLint) ctx->Array.Color.Enabled; + break; case GL_COLOR_ARRAY_SIZE: *params = ctx->Array.Color.Size; break; @@ -3549,6 +3609,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_COLOR_ARRAY_COUNT_EXT: *params = 0; break; + case GL_INDEX_ARRAY: + *params = (GLint) ctx->Array.Index.Enabled; + break; case GL_INDEX_ARRAY_TYPE: *params = ctx->Array.Index.Type; break; @@ -3558,6 +3621,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_INDEX_ARRAY_COUNT_EXT: *params = 0; break; + case GL_TEXTURE_COORD_ARRAY: + *params = (GLint) ctx->Array.TexCoord[texUnit].Enabled; + break; case GL_TEXTURE_COORD_ARRAY_SIZE: *params = ctx->Array.TexCoord[texUnit].Size; break; @@ -3570,6 +3636,9 @@ void gl_GetIntegerv( GLcontext *ctx, GLenum pname, GLint *params ) case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: *params = 0; break; + case GL_EDGE_FLAG_ARRAY: + *params = (GLint) ctx->Array.EdgeFlag.Enabled; + break; case GL_EDGE_FLAG_ARRAY_STRIDE: *params = ctx->Array.EdgeFlag.Stride; break; -- 2.30.2