ReactOS  0.4.14-dev-55-g2da92ac
get.c
Go to the documentation of this file.
1 /* $Id: get.c,v 1.19 1998/02/04 05:00:28 brianp Exp $ */
2 
3 /*
4  * Mesa 3-D graphics library
5  * Version: 2.6
6  * Copyright (C) 1995-1997 Brian Paul
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22 
23 
24 /*
25  * $Log: get.c,v $
26  * Revision 1.19 1998/02/04 05:00:28 brianp
27  * more casts for Amiga StormC
28  *
29  * Revision 1.18 1998/02/03 23:45:02 brianp
30  * added casts to prevent warnings with Amiga StormC compiler
31  *
32  * Revision 1.17 1997/12/06 18:06:50 brianp
33  * moved several static display list vars into GLcontext
34  *
35  * Revision 1.16 1997/10/29 01:29:09 brianp
36  * added GL_EXT_point_parameters extension from Daniel Barrero
37  *
38  * Revision 1.15 1997/10/16 01:59:08 brianp
39  * added GL_EXT_shared_texture_palette extension
40  *
41  * Revision 1.14 1997/07/24 01:25:18 brianp
42  * changed precompiled header symbol from PCH to PC_HEADER
43  *
44  * Revision 1.13 1997/06/20 02:00:27 brianp
45  * replaced Current.IntColor with Current.ByteColor
46  *
47  * Revision 1.12 1997/05/28 03:24:54 brianp
48  * added precompiled header (PCH) support
49  *
50  * Revision 1.11 1997/05/26 21:13:42 brianp
51  * rewrite code for GL_RED/GREEN/BLUE/ALPHA_BITS
52  *
53  * Revision 1.10 1997/04/26 04:33:11 brianp
54  * glGet(accum, stencil, depth bits) always returned non-zero values- wrong
55  *
56  * Revision 1.9 1997/03/11 00:57:38 brianp
57  * removed redundant GL_POLYGON_OFFSET_FACTOR_EXT cases
58  *
59  * Revision 1.8 1997/02/10 21:15:59 brianp
60  * renamed GL_TEXTURE_BINDING_3D_EXT to GL_TEXTURE_3D_BINDING_EXT
61  *
62  * Revision 1.7 1997/02/09 19:53:43 brianp
63  * now use TEXTURE_xD enable constants
64  *
65  * Revision 1.6 1997/02/09 18:49:23 brianp
66  * added GL_EXT_texture3D support
67  *
68  * Revision 1.5 1997/01/30 21:05:20 brianp
69  * moved in gl_GetPointerv() from varray.c
70  * added some missing GLenums to the glGet*() functions
71  *
72  * Revision 1.4 1997/01/28 22:13:42 brianp
73  * now there's separate state for CI and RGBA logic op enabled
74  *
75  * Revision 1.3 1996/10/11 03:43:34 brianp
76  * replaced old texture _EXT symbols
77  * added GL_EXT_polygon_offset stuff
78  *
79  * Revision 1.2 1996/09/15 14:17:30 brianp
80  * now use GLframebuffer and GLvisual
81  *
82  * Revision 1.1 1996/09/13 01:38:16 brianp
83  * Initial revision
84  *
85  */
86 
87 
88 #ifdef PC_HEADER
89 #include "all.h"
90 #else
91 #include <string.h>
92 #include "context.h"
93 #include "get.h"
94 #include "dlist.h"
95 #include "macros.h"
96 #include "types.h"
97 #endif
98 
99 
100 
101 #define FLOAT_TO_BOOL(X) ( (X)==0.0F ? GL_FALSE : GL_TRUE )
102 #define INT_TO_BOOL(I) ( (I)==0 ? GL_FALSE : GL_TRUE )
103 #define ENUM_TO_BOOL(E) ( (E)==0 ? GL_FALSE : GL_TRUE )
104 
105 #ifdef SPECIALCAST
106 /* Needed for an Amiga compiler */
107 #define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
108 #define ENUM_TO_DOUBLE(X) ((GLdouble)(GLint)(X))
109 #else
110 /* all other compilers */
111 #define ENUM_TO_FLOAT(X) ((GLfloat)(X))
112 #define ENUM_TO_DOUBLE(X) ((GLdouble)(X))
113 #endif
114 
115 
116 
118 {
119  GLuint i;
120 
121  if (INSIDE_BEGIN_END(ctx)) {
122  gl_error( ctx, GL_INVALID_OPERATION, "glGetBooleanv" );
123  return;
124  }
125 
126  switch (pname) {
127  case GL_ACCUM_RED_BITS:
128  case GL_ACCUM_GREEN_BITS:
129  case GL_ACCUM_BLUE_BITS:
130  case GL_ACCUM_ALPHA_BITS:
132  break;
134  params[0] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[0]);
135  params[1] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[1]);
136  params[2] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[2]);
137  params[3] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[3]);
138  break;
139  case GL_ALPHA_BIAS:
140  *params = FLOAT_TO_BOOL(ctx->Pixel.AlphaBias);
141  break;
142  case GL_ALPHA_BITS:
144  break;
145  case GL_ALPHA_SCALE:
146  *params = FLOAT_TO_BOOL(ctx->Pixel.AlphaScale);
147  break;
148  case GL_ALPHA_TEST:
149  *params = ctx->Color.AlphaEnabled;
150  break;
151  case GL_ALPHA_TEST_FUNC:
152  *params = ENUM_TO_BOOL(ctx->Color.AlphaFunc);
153  break;
154  case GL_ALPHA_TEST_REF:
155  *params = FLOAT_TO_BOOL(ctx->Color.AlphaRef);
156  break;
159  break;
160  case GL_AUTO_NORMAL:
161  *params = ctx->Eval.AutoNormal;
162  break;
163  case GL_AUX_BUFFERS:
165  break;
166  case GL_BLEND:
167  *params = ctx->Color.BlendEnabled;
168  break;
169  case GL_BLEND_DST:
170  *params = ENUM_TO_BOOL(ctx->Color.BlendDst);
171  break;
172  case GL_BLEND_SRC:
173  *params = ENUM_TO_BOOL(ctx->Color.BlendSrc);
174  break;
175  case GL_BLUE_BIAS:
176  *params = FLOAT_TO_BOOL(ctx->Pixel.BlueBias);
177  break;
178  case GL_BLUE_BITS:
179  *params = INT_TO_BOOL( ctx->Visual->BlueBits );
180  break;
181  case GL_BLUE_SCALE:
182  *params = FLOAT_TO_BOOL(ctx->Pixel.BlueScale);
183  break;
186  break;
187  case GL_CLIP_PLANE0:
188  case GL_CLIP_PLANE1:
189  case GL_CLIP_PLANE2:
190  case GL_CLIP_PLANE3:
191  case GL_CLIP_PLANE4:
192  case GL_CLIP_PLANE5:
193  *params = ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0];
194  break;
196  params[0] = FLOAT_TO_BOOL(ctx->Color.ClearColor[0]);
197  params[1] = FLOAT_TO_BOOL(ctx->Color.ClearColor[1]);
198  params[2] = FLOAT_TO_BOOL(ctx->Color.ClearColor[2]);
199  params[3] = FLOAT_TO_BOOL(ctx->Color.ClearColor[3]);
200  break;
201  case GL_COLOR_MATERIAL:
202  *params = ctx->Light.ColorMaterialEnabled;
203  break;
205  *params = ENUM_TO_BOOL(ctx->Light.ColorMaterialFace);
206  break;
208  *params = ENUM_TO_BOOL(ctx->Light.ColorMaterialMode);
209  break;
210  case GL_COLOR_WRITEMASK:
211  params[0] = (ctx->Color.ColorMask & 8) ? GL_TRUE : GL_FALSE;
212  params[1] = (ctx->Color.ColorMask & 4) ? GL_TRUE : GL_FALSE;
213  params[2] = (ctx->Color.ColorMask & 2) ? GL_TRUE : GL_FALSE;
214  params[3] = (ctx->Color.ColorMask & 1) ? GL_TRUE : GL_FALSE;
215  break;
216  case GL_CULL_FACE:
217  *params = ctx->Polygon.CullFlag;
218  break;
219  case GL_CULL_FACE_MODE:
220  *params = ENUM_TO_BOOL(ctx->Polygon.CullFaceMode);
221  break;
222  case GL_CURRENT_COLOR:
223  params[0] = INT_TO_BOOL(ctx->Current.ByteColor[0]);
224  params[1] = INT_TO_BOOL(ctx->Current.ByteColor[1]);
225  params[2] = INT_TO_BOOL(ctx->Current.ByteColor[2]);
226  params[3] = INT_TO_BOOL(ctx->Current.ByteColor[3]);
227  break;
228  case GL_CURRENT_INDEX:
229  *params = INT_TO_BOOL(ctx->Current.Index);
230  break;
231  case GL_CURRENT_NORMAL:
232  params[0] = FLOAT_TO_BOOL(ctx->Current.Normal[0]);
233  params[1] = FLOAT_TO_BOOL(ctx->Current.Normal[1]);
234  params[2] = FLOAT_TO_BOOL(ctx->Current.Normal[2]);
235  break;
237  params[0] = FLOAT_TO_BOOL(ctx->Current.RasterColor[0]);
238  params[1] = FLOAT_TO_BOOL(ctx->Current.RasterColor[1]);
239  params[2] = FLOAT_TO_BOOL(ctx->Current.RasterColor[2]);
240  params[3] = FLOAT_TO_BOOL(ctx->Current.RasterColor[3]);
241  break;
243  *params = FLOAT_TO_BOOL(ctx->Current.RasterDistance);
244  break;
246  *params = FLOAT_TO_BOOL(ctx->Current.RasterIndex);
247  break;
249  params[0] = FLOAT_TO_BOOL(ctx->Current.RasterPos[0]);
250  params[1] = FLOAT_TO_BOOL(ctx->Current.RasterPos[1]);
251  params[2] = FLOAT_TO_BOOL(ctx->Current.RasterPos[2]);
252  params[3] = FLOAT_TO_BOOL(ctx->Current.RasterPos[3]);
253  break;
255  params[0] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoord[0]);
256  params[1] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoord[1]);
257  params[2] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoord[2]);
258  params[3] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoord[3]);
259  break;
261  *params = ctx->Current.RasterPosValid;
262  break;
264  params[0] = FLOAT_TO_BOOL(ctx->Current.TexCoord[0]);
265  params[1] = FLOAT_TO_BOOL(ctx->Current.TexCoord[1]);
266  params[2] = FLOAT_TO_BOOL(ctx->Current.TexCoord[2]);
267  params[3] = FLOAT_TO_BOOL(ctx->Current.TexCoord[3]);
268  break;
269  case GL_DEPTH_BIAS:
270  *params = FLOAT_TO_BOOL(ctx->Pixel.DepthBias);
271  break;
272  case GL_DEPTH_BITS:
274  break;
276  *params = FLOAT_TO_BOOL(ctx->Depth.Clear);
277  break;
278  case GL_DEPTH_FUNC:
279  *params = ENUM_TO_BOOL(ctx->Depth.Func);
280  break;
281  case GL_DEPTH_RANGE:
282  params[0] = FLOAT_TO_BOOL(ctx->Viewport.Near);
283  params[1] = FLOAT_TO_BOOL(ctx->Viewport.Far);
284  break;
285  case GL_DEPTH_SCALE:
286  *params = FLOAT_TO_BOOL(ctx->Pixel.DepthScale);
287  break;
288  case GL_DEPTH_TEST:
289  *params = ctx->Depth.Test;
290  break;
291  case GL_DEPTH_WRITEMASK:
292  *params = ctx->Depth.Mask;
293  break;
294  case GL_DITHER:
295  *params = ctx->Color.DitherFlag;
296  break;
297  case GL_DOUBLEBUFFER:
298  *params = ctx->Visual->DBflag;
299  break;
300  case GL_DRAW_BUFFER:
301  *params = ENUM_TO_BOOL(ctx->Color.DrawBuffer);
302  break;
303  case GL_EDGE_FLAG:
304  *params = ctx->Current.EdgeFlag;
305  break;
307  /* TODO: is this right? Or, return number of entries in buffer? */
308  *params = INT_TO_BOOL(ctx->Feedback.BufferSize);
309  break;
311  *params = INT_TO_BOOL(ctx->Feedback.Type);
312  break;
313  case GL_FOG:
314  *params = ctx->Fog.Enabled;
315  break;
316  case GL_FOG_COLOR:
317  params[0] = FLOAT_TO_BOOL(ctx->Fog.Color[0]);
318  params[1] = FLOAT_TO_BOOL(ctx->Fog.Color[1]);
319  params[2] = FLOAT_TO_BOOL(ctx->Fog.Color[2]);
320  params[3] = FLOAT_TO_BOOL(ctx->Fog.Color[3]);
321  break;
322  case GL_FOG_DENSITY:
323  *params = FLOAT_TO_BOOL(ctx->Fog.Density);
324  break;
325  case GL_FOG_END:
326  *params = FLOAT_TO_BOOL(ctx->Fog.End);
327  break;
328  case GL_FOG_HINT:
329  *params = ENUM_TO_BOOL(ctx->Hint.Fog);
330  break;
331  case GL_FOG_INDEX:
332  *params = FLOAT_TO_BOOL(ctx->Fog.Index);
333  break;
334  case GL_FOG_MODE:
335  *params = ENUM_TO_BOOL(ctx->Fog.Mode);
336  break;
337  case GL_FOG_START:
338  *params = FLOAT_TO_BOOL(ctx->Fog.End);
339  break;
340  case GL_FRONT_FACE:
341  *params = ENUM_TO_BOOL(ctx->Polygon.FrontFace);
342  break;
343  case GL_GREEN_BIAS:
344  *params = FLOAT_TO_BOOL(ctx->Pixel.GreenBias);
345  break;
346  case GL_GREEN_BITS:
347  *params = INT_TO_BOOL( ctx->Visual->GreenBits );
348  break;
349  case GL_GREEN_SCALE:
350  *params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale);
351  break;
352  case GL_INDEX_BITS:
353  *params = INT_TO_BOOL( ctx->Visual->IndexBits );
354  break;
356  *params = INT_TO_BOOL(ctx->Color.ClearIndex);
357  break;
358  case GL_INDEX_MODE:
359  *params = ctx->Visual->RGBAflag ? GL_FALSE : GL_TRUE;
360  break;
361  case GL_INDEX_OFFSET:
362  *params = INT_TO_BOOL(ctx->Pixel.IndexOffset);
363  break;
364  case GL_INDEX_SHIFT:
365  *params = INT_TO_BOOL(ctx->Pixel.IndexShift);
366  break;
367  case GL_INDEX_WRITEMASK:
368  *params = INT_TO_BOOL(ctx->Color.IndexMask);
369  break;
370  case GL_LIGHT0:
371  case GL_LIGHT1:
372  case GL_LIGHT2:
373  case GL_LIGHT3:
374  case GL_LIGHT4:
375  case GL_LIGHT5:
376  case GL_LIGHT6:
377  case GL_LIGHT7:
378  *params = ctx->Light.Light[pname-GL_LIGHT0].Enabled;
379  break;
380  case GL_LIGHTING:
381  *params = ctx->Light.Enabled;
382  break;
384  params[0] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[0]);
385  params[1] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[1]);
386  params[2] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[2]);
387  params[3] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[3]);
388  break;
390  *params = ctx->Light.Model.LocalViewer;
391  break;
393  *params = ctx->Light.Model.TwoSide;
394  break;
395  case GL_LINE_SMOOTH:
396  *params = ctx->Line.SmoothFlag;
397  break;
398  case GL_LINE_SMOOTH_HINT:
399  *params = ENUM_TO_BOOL(ctx->Hint.LineSmooth);
400  break;
401  case GL_LINE_STIPPLE:
402  *params = ctx->Line.StippleFlag;
403  break;
405  *params = INT_TO_BOOL(ctx->Line.StipplePattern);
406  break;
408  *params = INT_TO_BOOL(ctx->Line.StippleFactor);
409  break;
410  case GL_LINE_WIDTH:
411  *params = FLOAT_TO_BOOL(ctx->Line.Width);
412  break;
415  break;
416  case GL_LINE_WIDTH_RANGE:
419  break;
420  case GL_LIST_BASE:
421  *params = INT_TO_BOOL(ctx->List.ListBase);
422  break;
423  case GL_LIST_INDEX:
424  *params = INT_TO_BOOL( ctx->CurrentListNum );
425  break;
426  case GL_LIST_MODE:
429  break;
430  case GL_INDEX_LOGIC_OP:
431  *params = ctx->Color.IndexLogicOpEnabled;
432  break;
433  case GL_COLOR_LOGIC_OP:
434  *params = ctx->Color.ColorLogicOpEnabled;
435  break;
436  case GL_LOGIC_OP_MODE:
437  *params = ENUM_TO_BOOL(ctx->Color.LogicOp);
438  break;
439  case GL_MAP1_COLOR_4:
440  *params = ctx->Eval.Map1Color4;
441  break;
442  case GL_MAP1_GRID_DOMAIN:
443  params[0] = FLOAT_TO_BOOL(ctx->Eval.MapGrid1u1);
444  params[1] = FLOAT_TO_BOOL(ctx->Eval.MapGrid1u2);
445  break;
447  *params = INT_TO_BOOL(ctx->Eval.MapGrid1un);
448  break;
449  case GL_MAP1_INDEX:
450  *params = ctx->Eval.Map1Index;
451  break;
452  case GL_MAP1_NORMAL:
453  *params = ctx->Eval.Map1Normal;
454  break;
456  *params = ctx->Eval.Map1TextureCoord1;
457  break;
459  *params = ctx->Eval.Map1TextureCoord2;
460  break;
462  *params = ctx->Eval.Map1TextureCoord3;
463  break;
465  *params = ctx->Eval.Map1TextureCoord4;
466  break;
467  case GL_MAP1_VERTEX_3:
468  *params = ctx->Eval.Map1Vertex3;
469  break;
470  case GL_MAP1_VERTEX_4:
471  *params = ctx->Eval.Map1Vertex4;
472  break;
473  case GL_MAP2_COLOR_4:
474  *params = ctx->Eval.Map2Color4;
475  break;
476  case GL_MAP2_GRID_DOMAIN:
477  params[0] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2u1);
478  params[1] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2u2);
479  params[2] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2v1);
480  params[3] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2v2);
481  break;
483  params[0] = INT_TO_BOOL(ctx->Eval.MapGrid2un);
484  params[1] = INT_TO_BOOL(ctx->Eval.MapGrid2vn);
485  break;
486  case GL_MAP2_INDEX:
487  *params = ctx->Eval.Map2Index;
488  break;
489  case GL_MAP2_NORMAL:
490  *params = ctx->Eval.Map2Normal;
491  break;
493  *params = ctx->Eval.Map2TextureCoord1;
494  break;
496  *params = ctx->Eval.Map2TextureCoord2;
497  break;
499  *params = ctx->Eval.Map2TextureCoord3;
500  break;
502  *params = ctx->Eval.Map2TextureCoord4;
503  break;
504  case GL_MAP2_VERTEX_3:
505  *params = ctx->Eval.Map2Vertex3;
506  break;
507  case GL_MAP2_VERTEX_4:
508  *params = ctx->Eval.Map2Vertex4;
509  break;
510  case GL_MAP_COLOR:
511  *params = ctx->Pixel.MapColorFlag;
512  break;
513  case GL_MAP_STENCIL:
514  *params = ctx->Pixel.MapStencilFlag;
515  break;
516  case GL_MATRIX_MODE:
517  *params = ENUM_TO_BOOL( ctx->Transform.MatrixMode );
518  break;
521  break;
524  break;
525  case GL_MAX_CLIP_PLANES:
527  break;
528  case GL_MAX_EVAL_ORDER:
530  break;
531  case GL_MAX_LIGHTS:
533  break;
534  case GL_MAX_LIST_NESTING:
536  break;
539  break;
542  break;
545  break;
548  break;
549  case GL_MAX_TEXTURE_SIZE:
551  break;
554  break;
558  break;
559  case GL_MODELVIEW_MATRIX:
560  for (i=0;i<16;i++) {
562  }
563  break;
566  break;
567  case GL_NAME_STACK_DEPTH:
568  *params = INT_TO_BOOL(ctx->Select.NameStackDepth);
569  break;
570  case GL_NORMALIZE:
571  *params = ctx->Transform.Normalize;
572  break;
573  case GL_PACK_ALIGNMENT:
574  *params = INT_TO_BOOL(ctx->Pack.Alignment);
575  break;
576  case GL_PACK_LSB_FIRST:
577  *params = ctx->Pack.LsbFirst;
578  break;
579  case GL_PACK_ROW_LENGTH:
580  *params = INT_TO_BOOL(ctx->Pack.RowLength);
581  break;
582  case GL_PACK_SKIP_PIXELS:
583  *params = INT_TO_BOOL(ctx->Pack.SkipPixels);
584  break;
585  case GL_PACK_SKIP_ROWS:
586  *params = INT_TO_BOOL(ctx->Pack.SkipRows);
587  break;
588  case GL_PACK_SWAP_BYTES:
589  *params = ctx->Pack.SwapBytes;
590  break;
592  *params = ENUM_TO_BOOL(ctx->Hint.PerspectiveCorrection);
593  break;
595  *params = INT_TO_BOOL(ctx->Pixel.MapAtoAsize);
596  break;
598  *params = INT_TO_BOOL(ctx->Pixel.MapBtoBsize);
599  break;
601  *params = INT_TO_BOOL(ctx->Pixel.MapGtoGsize);
602  break;
604  *params = INT_TO_BOOL(ctx->Pixel.MapItoAsize);
605  break;
607  *params = INT_TO_BOOL(ctx->Pixel.MapItoBsize);
608  break;
610  *params = INT_TO_BOOL(ctx->Pixel.MapItoGsize);
611  break;
613  *params = INT_TO_BOOL(ctx->Pixel.MapItoIsize);
614  break;
616  *params = INT_TO_BOOL(ctx->Pixel.MapItoRsize);
617  break;
619  *params = INT_TO_BOOL(ctx->Pixel.MapRtoRsize);
620  break;
622  *params = INT_TO_BOOL(ctx->Pixel.MapStoSsize);
623  break;
624  case GL_POINT_SIZE:
625  *params = FLOAT_TO_BOOL(ctx->Point.Size );
626  break;
629  break;
630  case GL_POINT_SIZE_RANGE:
633  break;
634  case GL_POINT_SMOOTH:
635  *params = ctx->Point.SmoothFlag;
636  break;
638  *params = ENUM_TO_BOOL(ctx->Hint.PointSmooth);
639  break;
640  case GL_POLYGON_MODE:
641  params[0] = ENUM_TO_BOOL(ctx->Polygon.FrontMode);
642  params[1] = ENUM_TO_BOOL(ctx->Polygon.BackMode);
643  break;
644 #ifdef GL_EXT_polygon_offset
646  *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetUnits );
647  break;
648 #endif
650  *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetFactor );
651  break;
653  *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetUnits );
654  break;
655  case GL_POLYGON_SMOOTH:
656  *params = ctx->Polygon.SmoothFlag;
657  break;
659  *params = ENUM_TO_BOOL(ctx->Hint.PolygonSmooth);
660  break;
661  case GL_POLYGON_STIPPLE:
662  *params = ctx->Polygon.StippleFlag;
663  break;
665  for (i=0;i<16;i++) {
667  }
668  break;
671  break;
672  case GL_READ_BUFFER:
673  *params = ENUM_TO_BOOL(ctx->Pixel.ReadBuffer);
674  break;
675  case GL_RED_BIAS:
676  *params = FLOAT_TO_BOOL(ctx->Pixel.RedBias);
677  break;
678  case GL_RED_BITS:
679  *params = INT_TO_BOOL( ctx->Visual->RedBits );
680  break;
681  case GL_RED_SCALE:
682  *params = FLOAT_TO_BOOL(ctx->Pixel.RedScale);
683  break;
684  case GL_RENDER_MODE:
685  *params = ENUM_TO_BOOL(ctx->RenderMode);
686  break;
687  case GL_RGBA_MODE:
688  *params = ctx->Visual->RGBAflag;
689  break;
690  case GL_SCISSOR_BOX:
691  params[0] = INT_TO_BOOL(ctx->Scissor.X);
692  params[1] = INT_TO_BOOL(ctx->Scissor.Y);
693  params[2] = INT_TO_BOOL(ctx->Scissor.Width);
694  params[3] = INT_TO_BOOL(ctx->Scissor.Height);
695  break;
696  case GL_SCISSOR_TEST:
697  *params = ctx->Scissor.Enabled;
698  break;
699  case GL_SHADE_MODEL:
700  *params = ENUM_TO_BOOL(ctx->Light.ShadeModel);
701  break;
702  case GL_STENCIL_BITS:
704  break;
706  *params = INT_TO_BOOL(ctx->Stencil.Clear);
707  break;
708  case GL_STENCIL_FAIL:
709  *params = ENUM_TO_BOOL(ctx->Stencil.FailFunc);
710  break;
711  case GL_STENCIL_FUNC:
712  *params = ENUM_TO_BOOL(ctx->Stencil.Function);
713  break;
715  *params = ENUM_TO_BOOL(ctx->Stencil.ZFailFunc);
716  break;
718  *params = ENUM_TO_BOOL(ctx->Stencil.ZPassFunc);
719  break;
720  case GL_STENCIL_REF:
721  *params = INT_TO_BOOL(ctx->Stencil.Ref);
722  break;
723  case GL_STENCIL_TEST:
724  *params = ctx->Stencil.Enabled;
725  break;
727  *params = INT_TO_BOOL(ctx->Stencil.ValueMask);
728  break;
730  *params = INT_TO_BOOL(ctx->Stencil.WriteMask);
731  break;
732  case GL_STEREO:
733  *params = GL_FALSE; /* TODO */
734  break;
735  case GL_SUBPIXEL_BITS:
736  *params = INT_TO_BOOL(0); /* TODO */
737  break;
738  case GL_TEXTURE_1D:
739  *params = (ctx->Texture.Enabled & TEXTURE_1D) ? GL_TRUE : GL_FALSE;
740  break;
741  case GL_TEXTURE_2D:
742  *params = (ctx->Texture.Enabled & TEXTURE_2D) ? GL_TRUE : GL_FALSE;
743  break;
745  params[0] = FLOAT_TO_BOOL(ctx->Texture.EnvColor[0]);
746  params[1] = FLOAT_TO_BOOL(ctx->Texture.EnvColor[1]);
747  params[2] = FLOAT_TO_BOOL(ctx->Texture.EnvColor[2]);
748  params[3] = FLOAT_TO_BOOL(ctx->Texture.EnvColor[3]);
749  break;
750  case GL_TEXTURE_ENV_MODE:
751  *params = ENUM_TO_BOOL(ctx->Texture.EnvMode);
752  break;
753  case GL_TEXTURE_GEN_S:
754  *params = (ctx->Texture.TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE;
755  break;
756  case GL_TEXTURE_GEN_T:
757  *params = (ctx->Texture.TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE;
758  break;
759  case GL_TEXTURE_GEN_R:
760  *params = (ctx->Texture.TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE;
761  break;
762  case GL_TEXTURE_GEN_Q:
763  *params = (ctx->Texture.TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE;
764  break;
765  case GL_TEXTURE_MATRIX:
766  for (i=0;i<16;i++) {
768  }
769  break;
772  break;
773  case GL_UNPACK_ALIGNMENT:
774  *params = INT_TO_BOOL(ctx->Unpack.Alignment);
775  break;
776  case GL_UNPACK_LSB_FIRST:
777  *params = ctx->Unpack.LsbFirst;
778  break;
780  *params = INT_TO_BOOL(ctx->Unpack.RowLength);
781  break;
783  *params = INT_TO_BOOL(ctx->Unpack.SkipPixels);
784  break;
785  case GL_UNPACK_SKIP_ROWS:
786  *params = INT_TO_BOOL(ctx->Unpack.SkipRows);
787  break;
789  *params = ctx->Unpack.SwapBytes;
790  break;
791  case GL_VIEWPORT:
792  params[0] = INT_TO_BOOL(ctx->Viewport.X);
793  params[1] = INT_TO_BOOL(ctx->Viewport.Y);
794  params[2] = INT_TO_BOOL(ctx->Viewport.Width);
795  params[3] = INT_TO_BOOL(ctx->Viewport.Height);
796  break;
797  case GL_ZOOM_X:
798  *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomX);
799  break;
800  case GL_ZOOM_Y:
801  *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomY);
802  break;
804  *params = INT_TO_BOOL(ctx->Array.VertexSize);
805  break;
807  *params = ENUM_TO_BOOL(ctx->Array.VertexType);
808  break;
810  *params = INT_TO_BOOL(ctx->Array.VertexStride);
811  break;
813  *params = INT_TO_BOOL(0);
814  break;
816  *params = ENUM_TO_BOOL(ctx->Array.NormalType);
817  break;
819  *params = INT_TO_BOOL(ctx->Array.NormalStride);
820  break;
822  *params = INT_TO_BOOL(0);
823  break;
824  case GL_COLOR_ARRAY_SIZE:
825  *params = INT_TO_BOOL(ctx->Array.ColorSize);
826  break;
827  case GL_COLOR_ARRAY_TYPE:
828  *params = ENUM_TO_BOOL(ctx->Array.ColorType);
829  break;
831  *params = INT_TO_BOOL(ctx->Array.ColorStride);
832  break;
834  *params = INT_TO_BOOL(0);
835  break;
836  case GL_INDEX_ARRAY_TYPE:
837  *params = ENUM_TO_BOOL(ctx->Array.IndexType);
838  break;
840  *params = INT_TO_BOOL(ctx->Array.IndexStride);
841  break;
843  *params = INT_TO_BOOL(0);
844  break;
846  *params = INT_TO_BOOL(ctx->Array.TexCoordSize);
847  break;
849  *params = ENUM_TO_BOOL(ctx->Array.TexCoordType);
850  break;
852  *params = INT_TO_BOOL(ctx->Array.TexCoordStride);
853  break;
855  *params = INT_TO_BOOL(0);
856  break;
858  *params = INT_TO_BOOL(ctx->Array.EdgeFlagStride);
859  break;
861  *params = INT_TO_BOOL(0);
862  break;
864  *params = INT_TO_BOOL(ctx->Texture.Current1D->Name);
865  break;
867  *params = INT_TO_BOOL(ctx->Texture.Current2D->Name);
868  break;
870  *params = INT_TO_BOOL(ctx->Texture.Current2D->Name);
871  break;
872  default:
873  gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" );
874  }
875 }
876 
877 
878 
879 
881 {
882  GLuint i;
883 
884  if (INSIDE_BEGIN_END(ctx)) {
885  gl_error( ctx, GL_INVALID_OPERATION, "glGetDoublev" );
886  return;
887  }
888 
889  switch (pname) {
890  case GL_ACCUM_RED_BITS:
891  case GL_ACCUM_GREEN_BITS:
892  case GL_ACCUM_BLUE_BITS:
893  case GL_ACCUM_ALPHA_BITS:
894  *params = (GLdouble) ctx->Visual->AccumBits;
895  break;
897  params[0] = (GLdouble) ctx->Accum.ClearColor[0];
898  params[1] = (GLdouble) ctx->Accum.ClearColor[1];
899  params[2] = (GLdouble) ctx->Accum.ClearColor[2];
900  params[3] = (GLdouble) ctx->Accum.ClearColor[3];
901  break;
902  case GL_ALPHA_BIAS:
903  *params = (GLdouble) ctx->Pixel.AlphaBias;
904  break;
905  case GL_ALPHA_BITS:
906  *params = (GLdouble) ctx->Visual->AlphaBits;
907  break;
908  case GL_ALPHA_SCALE:
909  *params = (GLdouble) ctx->Pixel.AlphaScale;
910  break;
911  case GL_ALPHA_TEST:
912  *params = (GLdouble) ctx->Color.AlphaEnabled;
913  break;
914  case GL_ALPHA_TEST_FUNC:
915  *params = ENUM_TO_DOUBLE(ctx->Color.AlphaFunc);
916  break;
917  case GL_ALPHA_TEST_REF:
918  *params = (GLdouble) ctx->Color.AlphaRef;
919  break;
921  *params = (GLdouble ) ctx->AttribStackDepth;
922  break;
923  case GL_AUTO_NORMAL:
924  *params = (GLdouble) ctx->Eval.AutoNormal;
925  break;
926  case GL_AUX_BUFFERS:
928  break;
929  case GL_BLEND:
930  *params = (GLdouble) ctx->Color.BlendEnabled;
931  break;
932  case GL_BLEND_DST:
933  *params = ENUM_TO_DOUBLE(ctx->Color.BlendDst);
934  break;
935  case GL_BLEND_SRC:
936  *params = ENUM_TO_DOUBLE(ctx->Color.BlendSrc);
937  break;
938  case GL_BLUE_BIAS:
939  *params = (GLdouble) ctx->Pixel.BlueBias;
940  break;
941  case GL_BLUE_BITS:
942  *params = (GLdouble) ctx->Visual->BlueBits;
943  break;
944  case GL_BLUE_SCALE:
945  *params = (GLdouble) ctx->Pixel.BlueScale;
946  break;
949  break;
950  case GL_CLIP_PLANE0:
951  case GL_CLIP_PLANE1:
952  case GL_CLIP_PLANE2:
953  case GL_CLIP_PLANE3:
954  case GL_CLIP_PLANE4:
955  case GL_CLIP_PLANE5:
956  *params = (GLdouble) ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0];
957  break;
959  params[0] = (GLdouble) ctx->Color.ClearColor[0];
960  params[1] = (GLdouble) ctx->Color.ClearColor[1];
961  params[2] = (GLdouble) ctx->Color.ClearColor[2];
962  params[3] = (GLdouble) ctx->Color.ClearColor[3];
963  break;
964  case GL_COLOR_MATERIAL:
965  *params = (GLdouble) ctx->Light.ColorMaterialEnabled;
966  break;
968  *params = ENUM_TO_DOUBLE(ctx->Light.ColorMaterialFace);
969  break;
971  *params = ENUM_TO_DOUBLE(ctx->Light.ColorMaterialMode);
972  break;
973  case GL_COLOR_WRITEMASK:
974  params[0] = (ctx->Color.ColorMask & 8) ? 1.0 : 0.0;
975  params[1] = (ctx->Color.ColorMask & 4) ? 1.0 : 0.0;
976  params[2] = (ctx->Color.ColorMask & 2) ? 1.0 : 0.0;
977  params[3] = (ctx->Color.ColorMask & 1) ? 1.0 : 0.0;
978  break;
979  case GL_CULL_FACE:
980  *params = (GLdouble) ctx->Polygon.CullFlag;
981  break;
982  case GL_CULL_FACE_MODE:
983  *params = ENUM_TO_DOUBLE(ctx->Polygon.CullFaceMode);
984  break;
985  case GL_CURRENT_COLOR:
986  params[0] = ctx->Current.ByteColor[0] * ctx->Visual->InvRedScale;
987  params[1] = ctx->Current.ByteColor[1] * ctx->Visual->InvGreenScale;
988  params[2] = ctx->Current.ByteColor[2] * ctx->Visual->InvBlueScale;
989  params[3] = ctx->Current.ByteColor[3] * ctx->Visual->InvAlphaScale;
990  break;
991  case GL_CURRENT_INDEX:
992  *params = (GLdouble) ctx->Current.Index;
993  break;
994  case GL_CURRENT_NORMAL:
995  params[0] = (GLdouble) ctx->Current.Normal[0];
996  params[1] = (GLdouble) ctx->Current.Normal[1];
997  params[2] = (GLdouble) ctx->Current.Normal[2];
998  break;
1000  params[0] = (GLdouble) ctx->Current.RasterColor[0];
1001  params[1] = (GLdouble) ctx->Current.RasterColor[1];
1002  params[2] = (GLdouble) ctx->Current.RasterColor[2];
1003  params[3] = (GLdouble) ctx->Current.RasterColor[3];
1004  break;
1006  params[0] = (GLdouble) ctx->Current.RasterDistance;
1007  break;
1009  *params = (GLdouble) ctx->Current.RasterIndex;
1010  break;
1012  params[0] = (GLdouble) ctx->Current.RasterPos[0];
1013  params[1] = (GLdouble) ctx->Current.RasterPos[1];
1014  params[2] = (GLdouble) ctx->Current.RasterPos[2];
1015  params[3] = (GLdouble) ctx->Current.RasterPos[3];
1016  break;
1018  params[0] = (GLdouble) ctx->Current.RasterTexCoord[0];
1019  params[1] = (GLdouble) ctx->Current.RasterTexCoord[1];
1020  params[2] = (GLdouble) ctx->Current.RasterTexCoord[2];
1021  params[3] = (GLdouble) ctx->Current.RasterTexCoord[3];
1022  break;
1024  *params = (GLdouble) ctx->Current.RasterPosValid;
1025  break;
1027  params[0] = (GLdouble) ctx->Current.TexCoord[0];
1028  params[1] = (GLdouble) ctx->Current.TexCoord[1];
1029  params[2] = (GLdouble) ctx->Current.TexCoord[2];
1030  params[3] = (GLdouble) ctx->Current.TexCoord[3];
1031  break;
1032  case GL_DEPTH_BIAS:
1033  *params = (GLdouble) ctx->Pixel.DepthBias;
1034  break;
1035  case GL_DEPTH_BITS:
1036  *params = (GLdouble) ctx->Visual->DepthBits;
1037  break;
1038  case GL_DEPTH_CLEAR_VALUE:
1039  *params = (GLdouble) ctx->Depth.Clear;
1040  break;
1041  case GL_DEPTH_FUNC:
1042  *params = ENUM_TO_DOUBLE(ctx->Depth.Func);
1043  break;
1044  case GL_DEPTH_RANGE:
1045  params[0] = (GLdouble) ctx->Viewport.Near;
1046  params[1] = (GLdouble) ctx->Viewport.Far;
1047  break;
1048  case GL_DEPTH_SCALE:
1049  *params = (GLdouble) ctx->Pixel.DepthScale;
1050  break;
1051  case GL_DEPTH_TEST:
1052  *params = (GLdouble) ctx->Depth.Test;
1053  break;
1054  case GL_DEPTH_WRITEMASK:
1055  *params = (GLdouble) ctx->Depth.Mask;
1056  break;
1057  case GL_DITHER:
1058  *params = (GLdouble) ctx->Color.DitherFlag;
1059  break;
1060  case GL_DOUBLEBUFFER:
1061  *params = (GLdouble) ctx->Visual->DBflag;
1062  break;
1063  case GL_DRAW_BUFFER:
1064  *params = ENUM_TO_DOUBLE(ctx->Color.DrawBuffer);
1065  break;
1066  case GL_EDGE_FLAG:
1067  *params = (GLdouble) ctx->Current.EdgeFlag;
1068  break;
1070  /* TODO: is this right? Or, return number of entries in buffer? */
1071  *params = (GLdouble) ctx->Feedback.BufferSize;
1072  break;
1074  *params = ENUM_TO_DOUBLE(ctx->Feedback.Type);
1075  break;
1076  case GL_FOG:
1077  *params = (GLdouble) ctx->Fog.Enabled;
1078  break;
1079  case GL_FOG_COLOR:
1080  params[0] = (GLdouble) ctx->Fog.Color[0];
1081  params[1] = (GLdouble) ctx->Fog.Color[1];
1082  params[2] = (GLdouble) ctx->Fog.Color[2];
1083  params[3] = (GLdouble) ctx->Fog.Color[3];
1084  break;
1085  case GL_FOG_DENSITY:
1086  *params = (GLdouble) ctx->Fog.Density;
1087  break;
1088  case GL_FOG_END:
1089  *params = (GLdouble) ctx->Fog.End;
1090  break;
1091  case GL_FOG_HINT:
1092  *params = ENUM_TO_DOUBLE(ctx->Hint.Fog);
1093  break;
1094  case GL_FOG_INDEX:
1095  *params = (GLdouble) ctx->Fog.Index;
1096  break;
1097  case GL_FOG_MODE:
1098  *params = ENUM_TO_DOUBLE(ctx->Fog.Mode);
1099  break;
1100  case GL_FOG_START:
1101  *params = (GLdouble) ctx->Fog.Start;
1102  break;
1103  case GL_FRONT_FACE:
1104  *params = ENUM_TO_DOUBLE(ctx->Polygon.FrontFace);
1105  break;
1106  case GL_GREEN_BIAS:
1107  *params = (GLdouble) ctx->Pixel.GreenBias;
1108  break;
1109  case GL_GREEN_BITS:
1110  *params = (GLdouble) ctx->Visual->GreenBits;
1111  break;
1112  case GL_GREEN_SCALE:
1113  *params = (GLdouble) ctx->Pixel.GreenScale;
1114  break;
1115  case GL_INDEX_BITS:
1116  *params = (GLdouble) ctx->Visual->IndexBits;
1117  break;
1118  case GL_INDEX_CLEAR_VALUE:
1119  *params = (GLdouble) ctx->Color.ClearIndex;
1120  break;
1121  case GL_INDEX_MODE:
1122  *params = ctx->Visual->RGBAflag ? 0.0 : 1.0;
1123  break;
1124  case GL_INDEX_OFFSET:
1125  *params = (GLdouble) ctx->Pixel.IndexOffset;
1126  break;
1127  case GL_INDEX_SHIFT:
1128  *params = (GLdouble) ctx->Pixel.IndexShift;
1129  break;
1130  case GL_INDEX_WRITEMASK:
1131  *params = (GLdouble) ctx->Color.IndexMask;
1132  break;
1133  case GL_LIGHT0:
1134  case GL_LIGHT1:
1135  case GL_LIGHT2:
1136  case GL_LIGHT3:
1137  case GL_LIGHT4:
1138  case GL_LIGHT5:
1139  case GL_LIGHT6:
1140  case GL_LIGHT7:
1141  *params = (GLdouble) ctx->Light.Light[pname-GL_LIGHT0].Enabled;
1142  break;
1143  case GL_LIGHTING:
1144  *params = (GLdouble) ctx->Light.Enabled;
1145  break;
1147  params[0] = (GLdouble) ctx->Light.Model.Ambient[0];
1148  params[1] = (GLdouble) ctx->Light.Model.Ambient[1];
1149  params[2] = (GLdouble) ctx->Light.Model.Ambient[2];
1150  params[3] = (GLdouble) ctx->Light.Model.Ambient[3];
1151  break;
1153  *params = (GLdouble) ctx->Light.Model.LocalViewer;
1154  break;
1156  *params = (GLdouble) ctx->Light.Model.TwoSide;
1157  break;
1158  case GL_LINE_SMOOTH:
1159  *params = (GLdouble) ctx->Line.SmoothFlag;
1160  break;
1161  case GL_LINE_SMOOTH_HINT:
1162  *params = ENUM_TO_DOUBLE(ctx->Hint.LineSmooth);
1163  break;
1164  case GL_LINE_STIPPLE:
1165  *params = (GLdouble) ctx->Line.StippleFlag;
1166  break;
1168  *params = (GLdouble) ctx->Line.StipplePattern;
1169  break;
1171  *params = (GLdouble) ctx->Line.StippleFactor;
1172  break;
1173  case GL_LINE_WIDTH:
1174  *params = (GLdouble) ctx->Line.Width;
1175  break;
1178  break;
1179  case GL_LINE_WIDTH_RANGE:
1182  break;
1183  case GL_LIST_BASE:
1184  *params = (GLdouble) ctx->List.ListBase;
1185  break;
1186  case GL_LIST_INDEX:
1187  *params = (GLdouble) ctx->CurrentListNum;
1188  break;
1189  case GL_LIST_MODE:
1192  break;
1193  case GL_INDEX_LOGIC_OP:
1194  *params = (GLdouble) ctx->Color.IndexLogicOpEnabled;
1195  break;
1196  case GL_COLOR_LOGIC_OP:
1197  *params = (GLdouble) ctx->Color.ColorLogicOpEnabled;
1198  break;
1199  case GL_LOGIC_OP_MODE:
1200  *params = ENUM_TO_DOUBLE(ctx->Color.LogicOp);
1201  break;
1202  case GL_MAP1_COLOR_4:
1203  *params = (GLdouble) ctx->Eval.Map1Color4;
1204  break;
1205  case GL_MAP1_GRID_DOMAIN:
1206  params[0] = (GLdouble) ctx->Eval.MapGrid1u1;
1207  params[1] = (GLdouble) ctx->Eval.MapGrid1u2;
1208  break;
1209  case GL_MAP1_GRID_SEGMENTS:
1210  *params = (GLdouble) ctx->Eval.MapGrid1un;
1211  break;
1212  case GL_MAP1_INDEX:
1213  *params = (GLdouble) ctx->Eval.Map1Index;
1214  break;
1215  case GL_MAP1_NORMAL:
1216  *params = (GLdouble) ctx->Eval.Map1Normal;
1217  break;
1219  *params = (GLdouble) ctx->Eval.Map1TextureCoord1;
1220  break;
1222  *params = (GLdouble) ctx->Eval.Map1TextureCoord2;
1223  break;
1225  *params = (GLdouble) ctx->Eval.Map1TextureCoord3;
1226  break;
1228  *params = (GLdouble) ctx->Eval.Map1TextureCoord4;
1229  break;
1230  case GL_MAP1_VERTEX_3:
1231  *params = (GLdouble) ctx->Eval.Map1Vertex3;
1232  break;
1233  case GL_MAP1_VERTEX_4:
1234  *params = (GLdouble) ctx->Eval.Map1Vertex4;
1235  break;
1236  case GL_MAP2_COLOR_4:
1237  *params = (GLdouble) ctx->Eval.Map2Color4;
1238  break;
1239  case GL_MAP2_GRID_DOMAIN:
1240  params[0] = (GLdouble) ctx->Eval.MapGrid2u1;
1241  params[1] = (GLdouble) ctx->Eval.MapGrid2u2;
1242  params[2] = (GLdouble) ctx->Eval.MapGrid2v1;
1243  params[3] = (GLdouble) ctx->Eval.MapGrid2v2;
1244  break;
1245  case GL_MAP2_GRID_SEGMENTS:
1246  params[0] = (GLdouble) ctx->Eval.MapGrid2un;
1247  params[1] = (GLdouble) ctx->Eval.MapGrid2vn;
1248  break;
1249  case GL_MAP2_INDEX:
1250  *params = (GLdouble) ctx->Eval.Map2Index;
1251  break;
1252  case GL_MAP2_NORMAL:
1253  *params = (GLdouble) ctx->Eval.Map2Normal;
1254  break;
1256  *params = (GLdouble) ctx->Eval.Map2TextureCoord1;
1257  break;
1259  *params = (GLdouble) ctx->Eval.Map2TextureCoord2;
1260  break;
1262  *params = (GLdouble) ctx->Eval.Map2TextureCoord3;
1263  break;
1265  *params = (GLdouble) ctx->Eval.Map2TextureCoord4;
1266  break;
1267  case GL_MAP2_VERTEX_3:
1268  *params = (GLdouble) ctx->Eval.Map2Vertex3;
1269  break;
1270  case GL_MAP2_VERTEX_4:
1271  *params = (GLdouble) ctx->Eval.Map2Vertex4;
1272  break;
1273  case GL_MAP_COLOR:
1274  *params = (GLdouble) ctx->Pixel.MapColorFlag;
1275  break;
1276  case GL_MAP_STENCIL:
1277  *params = (GLdouble) ctx->Pixel.MapStencilFlag;
1278  break;
1279  case GL_MATRIX_MODE:
1280  *params = ENUM_TO_DOUBLE(ctx->Transform.MatrixMode);
1281  break;
1284  break;
1287  break;
1288  case GL_MAX_CLIP_PLANES:
1290  break;
1291  case GL_MAX_EVAL_ORDER:
1293  break;
1294  case GL_MAX_LIGHTS:
1295  *params = (GLdouble) MAX_LIGHTS;
1296  break;
1297  case GL_MAX_LIST_NESTING:
1299  break;
1302  break;
1305  break;
1308  break;
1311  break;
1312  case GL_MAX_TEXTURE_SIZE:
1314  break;
1317  break;
1318  case GL_MAX_VIEWPORT_DIMS:
1319  params[0] = (GLdouble) MAX_WIDTH;
1320  params[1] = (GLdouble) MAX_HEIGHT;
1321  break;
1322  case GL_MODELVIEW_MATRIX:
1323  for (i=0;i<16;i++) {
1324  params[i] = (GLdouble) ctx->ModelViewMatrix[i];
1325  }
1326  break;
1329  break;
1330  case GL_NAME_STACK_DEPTH:
1331  *params = (GLdouble) ctx->Select.NameStackDepth;
1332  break;
1333  case GL_NORMALIZE:
1334  *params = (GLdouble) ctx->Transform.Normalize;
1335  break;
1336  case GL_PACK_ALIGNMENT:
1337  *params = (GLdouble) ctx->Pack.Alignment;
1338  break;
1339  case GL_PACK_LSB_FIRST:
1340  *params = (GLdouble) ctx->Pack.LsbFirst;
1341  break;
1342  case GL_PACK_ROW_LENGTH:
1343  *params = (GLdouble) ctx->Pack.RowLength;
1344  break;
1345  case GL_PACK_SKIP_PIXELS:
1346  *params = (GLdouble) ctx->Pack.SkipPixels;
1347  break;
1348  case GL_PACK_SKIP_ROWS:
1349  *params = (GLdouble) ctx->Pack.SkipRows;
1350  break;
1351  case GL_PACK_SWAP_BYTES:
1352  *params = (GLdouble) ctx->Pack.SwapBytes;
1353  break;
1355  *params = ENUM_TO_DOUBLE(ctx->Hint.PerspectiveCorrection);
1356  break;
1358  *params = (GLdouble) ctx->Pixel.MapAtoAsize;
1359  break;
1361  *params = (GLdouble) ctx->Pixel.MapBtoBsize;
1362  break;
1364  *params = (GLdouble) ctx->Pixel.MapGtoGsize;
1365  break;
1367  *params = (GLdouble) ctx->Pixel.MapItoAsize;
1368  break;
1370  *params = (GLdouble) ctx->Pixel.MapItoBsize;
1371  break;
1373  *params = (GLdouble) ctx->Pixel.MapItoGsize;
1374  break;
1376  *params = (GLdouble) ctx->Pixel.MapItoIsize;
1377  break;
1379  *params = (GLdouble) ctx->Pixel.MapItoRsize;
1380  break;
1382  *params = (GLdouble) ctx->Pixel.MapRtoRsize;
1383  break;
1385  *params = (GLdouble) ctx->Pixel.MapStoSsize;
1386  break;
1387  case GL_POINT_SIZE:
1388  *params = (GLdouble) ctx->Point.Size;
1389  break;
1392  break;
1393  case GL_POINT_SIZE_RANGE:
1396  break;
1397  case GL_POINT_SMOOTH:
1398  *params = (GLdouble) ctx->Point.SmoothFlag;
1399  break;
1400  case GL_POINT_SMOOTH_HINT:
1401  *params = ENUM_TO_DOUBLE(ctx->Hint.PointSmooth);
1402  break;
1403  case GL_POLYGON_MODE:
1404  params[0] = ENUM_TO_DOUBLE(ctx->Polygon.FrontMode);
1405  params[1] = ENUM_TO_DOUBLE(ctx->Polygon.BackMode);
1406  break;
1407 #ifdef GL_EXT_polygon_offset
1409  *params = (GLdouble) ctx->Polygon.OffsetUnits;
1410  break;
1411 #endif
1413  *params = (GLdouble) ctx->Polygon.OffsetFactor;
1414  break;
1416  *params = (GLdouble) ctx->Polygon.OffsetUnits;
1417  break;
1418  case GL_POLYGON_SMOOTH:
1419  *params = (GLdouble) ctx->Polygon.SmoothFlag;
1420  break;
1422  *params = ENUM_TO_DOUBLE(ctx->Hint.PolygonSmooth);
1423  break;
1424  case GL_POLYGON_STIPPLE:
1425  for (i=0;i<32;i++) { /* RIGHT? */
1426  params[i] = (GLdouble) ctx->PolygonStipple[i];
1427  }
1428  break;
1429  case GL_PROJECTION_MATRIX:
1430  for (i=0;i<16;i++) {
1431  params[i] = (GLdouble) ctx->ProjectionMatrix[i];
1432  }
1433  break;
1436  break;
1437  case GL_READ_BUFFER:
1438  *params = ENUM_TO_DOUBLE(ctx->Pixel.ReadBuffer);
1439  break;
1440  case GL_RED_BIAS:
1441  *params = (GLdouble) ctx->Pixel.RedBias;
1442  break;
1443  case GL_RED_BITS:
1444  *params = (GLdouble) ctx->Visual->RedBits;
1445  break;
1446  case GL_RED_SCALE:
1447  *params = (GLdouble) ctx->Pixel.RedScale;
1448  break;
1449  case GL_RENDER_MODE:
1450  *params = ENUM_TO_DOUBLE(ctx->RenderMode);
1451  break;
1452  case GL_RGBA_MODE:
1453  *params = (GLdouble) ctx->Visual->RGBAflag;
1454  break;
1455  case GL_SCISSOR_BOX:
1456  params[0] = (GLdouble) ctx->Scissor.X;
1457  params[1] = (GLdouble) ctx->Scissor.Y;
1458  params[2] = (GLdouble) ctx->Scissor.Width;
1459  params[3] = (GLdouble) ctx->Scissor.Height;
1460  break;
1461  case GL_SCISSOR_TEST:
1462  *params = (GLdouble) ctx->Scissor.Enabled;
1463  break;
1464  case GL_SHADE_MODEL:
1465  *params = ENUM_TO_DOUBLE(ctx->Light.ShadeModel);
1466  break;
1467  case GL_STENCIL_BITS:
1468  *params = (GLdouble) ctx->Visual->StencilBits;
1469  break;
1471  *params = (GLdouble) ctx->Stencil.Clear;
1472  break;
1473  case GL_STENCIL_FAIL:
1474  *params = ENUM_TO_DOUBLE(ctx->Stencil.FailFunc);
1475  break;
1476  case GL_STENCIL_FUNC:
1477  *params = ENUM_TO_DOUBLE(ctx->Stencil.Function);
1478  break;
1480  *params = ENUM_TO_DOUBLE(ctx->Stencil.ZFailFunc);
1481  break;
1483  *params = ENUM_TO_DOUBLE(ctx->Stencil.ZPassFunc);
1484  break;
1485  case GL_STENCIL_REF:
1486  *params = (GLdouble) ctx->Stencil.Ref;
1487  break;
1488  case GL_STENCIL_TEST:
1489  *params = (GLdouble) ctx->Stencil.Enabled;
1490  break;
1491  case GL_STENCIL_VALUE_MASK:
1492  *params = (GLdouble) ctx->Stencil.ValueMask;
1493  break;
1494  case GL_STENCIL_WRITEMASK:
1495  *params = (GLdouble) ctx->Stencil.WriteMask;
1496  break;
1497  case GL_STEREO:
1498  *params = 0.0; /* TODO */
1499  break;
1500  case GL_SUBPIXEL_BITS:
1501  *params = 0.0; /* TODO */
1502  break;
1503  case GL_TEXTURE_1D:
1504  *params = (ctx->Texture.Enabled & TEXTURE_1D) ? 1.0 : 0.0;
1505  break;
1506  case GL_TEXTURE_2D:
1507  *params = (ctx->Texture.Enabled & TEXTURE_2D) ? 1.0 : 0.0;
1508  break;
1509  case GL_TEXTURE_ENV_COLOR:
1510  params[0] = (GLdouble) ctx->Texture.EnvColor[0];
1511  params[1] = (GLdouble) ctx->Texture.EnvColor[1];
1512  params[2] = (GLdouble) ctx->Texture.EnvColor[2];
1513  params[3] = (GLdouble) ctx->Texture.EnvColor[3];
1514  break;
1515  case GL_TEXTURE_ENV_MODE:
1516  *params = ENUM_TO_DOUBLE(ctx->Texture.EnvMode);
1517  break;
1518  case GL_TEXTURE_GEN_S:
1519  *params = (ctx->Texture.TexGenEnabled & S_BIT) ? 1.0 : 0.0;
1520  break;
1521  case GL_TEXTURE_GEN_T:
1522  *params = (ctx->Texture.TexGenEnabled & T_BIT) ? 1.0 : 0.0;
1523  break;
1524  case GL_TEXTURE_GEN_R:
1525  *params = (ctx->Texture.TexGenEnabled & R_BIT) ? 1.0 : 0.0;
1526  break;
1527  case GL_TEXTURE_GEN_Q:
1528  *params = (ctx->Texture.TexGenEnabled & Q_BIT) ? 1.0 : 0.0;
1529  break;
1530  case GL_TEXTURE_MATRIX:
1531  for (i=0;i<16;i++) {
1532  params[i] = (GLdouble) ctx->TextureMatrix[i];
1533  }
1534  break;
1536  *params = (GLdouble) ctx->TextureStackDepth;
1537  break;
1538  case GL_UNPACK_ALIGNMENT:
1539  *params = (GLdouble) ctx->Unpack.Alignment;
1540  break;
1541  case GL_UNPACK_LSB_FIRST:
1542  *params = (GLdouble) ctx->Unpack.LsbFirst;
1543  break;
1544  case GL_UNPACK_ROW_LENGTH:
1545  *params = (GLdouble) ctx->Unpack.RowLength;
1546  break;
1547  case GL_UNPACK_SKIP_PIXELS:
1548  *params = (GLdouble) ctx->Unpack.SkipPixels;
1549  break;
1550  case GL_UNPACK_SKIP_ROWS:
1551  *params = (GLdouble) ctx->Unpack.SkipRows;
1552  break;
1553  case GL_UNPACK_SWAP_BYTES:
1554  *params = (GLdouble) ctx->Unpack.SwapBytes;
1555  break;
1556  case GL_VIEWPORT:
1557  params[0] = (GLdouble) ctx->Viewport.X;
1558  params[1] = (GLdouble) ctx->Viewport.Y;
1559  params[2] = (GLdouble) ctx->Viewport.Width;
1560  params[3] = (GLdouble) ctx->Viewport.Height;
1561  break;
1562  case GL_ZOOM_X:
1563  *params = (GLdouble) ctx->Pixel.ZoomX;
1564  break;
1565  case GL_ZOOM_Y:
1566  *params = (GLdouble) ctx->Pixel.ZoomY;
1567  break;
1568  case GL_VERTEX_ARRAY_SIZE:
1569  *params = (GLdouble) ctx->Array.VertexSize;
1570  break;
1571  case GL_VERTEX_ARRAY_TYPE:
1572  *params = ENUM_TO_DOUBLE(ctx->Array.VertexType);
1573  break;
1575  *params = (GLdouble) ctx->Array.VertexStride;
1576  break;
1578  *params = 0.0;
1579  break;
1580  case GL_NORMAL_ARRAY_TYPE:
1581  *params = ENUM_TO_DOUBLE(ctx->Array.NormalType);
1582  break;
1584  *params = (GLdouble) ctx->Array.NormalStride;
1585  break;
1587  *params = 0.0;
1588  break;
1589  case GL_COLOR_ARRAY_SIZE:
1590  *params = (GLdouble) ctx->Array.ColorSize;
1591  break;
1592  case GL_COLOR_ARRAY_TYPE:
1593  *params = ENUM_TO_DOUBLE(ctx->Array.ColorType);
1594  break;
1595  case GL_COLOR_ARRAY_STRIDE:
1596  *params = (GLdouble) ctx->Array.ColorStride;
1597  break;
1599  *params = 0.0;
1600  break;
1601  case GL_INDEX_ARRAY_TYPE:
1602  *params = ENUM_TO_DOUBLE(ctx->Array.IndexType);
1603  break;
1604  case GL_INDEX_ARRAY_STRIDE:
1605  *params = (GLdouble) ctx->Array.IndexStride;
1606  break;
1608  *params = 0.0;
1609  break;
1611  *params = (GLdouble) ctx->Array.TexCoordSize;
1612  break;
1614  *params = ENUM_TO_DOUBLE(ctx->Array.TexCoordType);
1615  break;
1617  *params = (GLdouble) ctx->Array.TexCoordStride;
1618  break;
1620  *params = 0.0;
1621  break;
1623  *params = (GLdouble) ctx->Array.EdgeFlagStride;
1624  break;
1626  *params = 0.0;
1627  break;
1628  case GL_TEXTURE_BINDING_1D:
1629  *params = (GLdouble) ctx->Texture.Current1D->Name;
1630  break;
1631  case GL_TEXTURE_BINDING_2D:
1632  *params = (GLdouble) ctx->Texture.Current2D->Name;
1633  break;
1634 
1635  default:
1636  gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" );
1637  }
1638 }
1639 
1640 
1641 
1642 
1644 {
1645  GLuint i;
1646 
1647  if (INSIDE_BEGIN_END(ctx)) {
1648  gl_error( ctx, GL_INVALID_OPERATION, "glGetFloatv" );
1649  return;
1650  }
1651  switch (pname) {
1652  case GL_ACCUM_RED_BITS:
1653  case GL_ACCUM_GREEN_BITS:
1654  case GL_ACCUM_BLUE_BITS:
1655  case GL_ACCUM_ALPHA_BITS:
1656  *params = (GLfloat) ctx->Visual->AccumBits;
1657  break;
1658  case GL_ACCUM_CLEAR_VALUE:
1659  params[0] = ctx->Accum.ClearColor[0];
1660  params[1] = ctx->Accum.ClearColor[1];
1661  params[2] = ctx->Accum.ClearColor[2];
1662  params[3] = ctx->Accum.ClearColor[3];
1663  break;
1664  case GL_ALPHA_BIAS:
1665  *params = ctx->Pixel.AlphaBias;
1666  break;
1667  case GL_ALPHA_BITS:
1668  *params = (GLfloat) ctx->Visual->AlphaBits;
1669  break;
1670  case GL_ALPHA_SCALE:
1671  *params = ctx->Pixel.AlphaScale;
1672  break;
1673  case GL_ALPHA_TEST:
1674  *params = (GLfloat) ctx->Color.AlphaEnabled;
1675  break;
1676  case GL_ALPHA_TEST_FUNC:
1677  *params = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
1678  break;
1679  case GL_ALPHA_TEST_REF:
1680  *params = (GLfloat) ctx->Color.AlphaRef;
1681  break;
1682  case GL_ATTRIB_STACK_DEPTH:
1683  *params = (GLfloat ) ctx->AttribStackDepth;
1684  break;
1685  case GL_AUTO_NORMAL:
1686  *params = (GLfloat) ctx->Eval.AutoNormal;
1687  break;
1688  case GL_AUX_BUFFERS:
1690  break;
1691  case GL_BLEND:
1692  *params = (GLfloat) ctx->Color.BlendEnabled;
1693  break;
1694  case GL_BLEND_DST:
1695  *params = ENUM_TO_FLOAT(ctx->Color.BlendDst);
1696  break;
1697  case GL_BLEND_SRC:
1698  *params = ENUM_TO_FLOAT(ctx->Color.BlendSrc);
1699  break;
1700  case GL_BLUE_BIAS:
1701  *params = ctx->Pixel.BlueBias;
1702  break;
1703  case GL_BLUE_BITS:
1704  *params = (GLfloat) ctx->Visual->BlueBits;
1705  break;
1706  case GL_BLUE_SCALE:
1707  *params = ctx->Pixel.BlueScale;
1708  break;
1711  break;
1712  case GL_CLIP_PLANE0:
1713  case GL_CLIP_PLANE1:
1714  case GL_CLIP_PLANE2:
1715  case GL_CLIP_PLANE3:
1716  case GL_CLIP_PLANE4:
1717  case GL_CLIP_PLANE5:
1718  *params = (GLfloat) ctx->Transform.ClipEnabled[pname-GL_CLIP_PLANE0];
1719  break;
1720  case GL_COLOR_CLEAR_VALUE:
1721  params[0] = (GLfloat) ctx->Color.ClearColor[0];
1722  params[1] = (GLfloat) ctx->Color.ClearColor[1];
1723  params[2] = (GLfloat) ctx->Color.ClearColor[2];
1724  params[3] = (GLfloat) ctx->Color.ClearColor[3];
1725  break;
1726  case GL_COLOR_MATERIAL:
1727  *params = (GLfloat) ctx->Light.ColorMaterialEnabled;
1728  break;
1730  *params = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
1731  break;
1733  *params = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
1734  break;
1735  case GL_COLOR_WRITEMASK:
1736  params[0] = (ctx->Color.ColorMask & 8) ? 1.0F : 0.0F;
1737  params[1] = (ctx->Color.ColorMask & 4) ? 1.0F : 0.0F;
1738  params[2] = (ctx->Color.ColorMask & 2) ? 1.0F : 0.0F;
1739  params[3] = (ctx->Color.ColorMask & 1) ? 1.0F : 0.0F;
1740  break;
1741  case GL_CULL_FACE:
1742  *params = (GLfloat) ctx->Polygon.CullFlag;
1743  break;
1744  case GL_CULL_FACE_MODE:
1745  *params = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
1746  break;
1747  case GL_CURRENT_COLOR:
1748  params[0] = ctx->Current.ByteColor[0] * ctx->Visual->InvRedScale;
1749  params[1] = ctx->Current.ByteColor[1] * ctx->Visual->InvGreenScale;
1750  params[2] = ctx->Current.ByteColor[2] * ctx->Visual->InvBlueScale;
1751  params[3] = ctx->Current.ByteColor[3] * ctx->Visual->InvAlphaScale;
1752  break;
1753  case GL_CURRENT_INDEX:
1754  *params = (GLfloat) ctx->Current.Index;
1755  break;
1756  case GL_CURRENT_NORMAL:
1757  params[0] = ctx->Current.Normal[0];
1758  params[1] = ctx->Current.Normal[1];
1759  params[2] = ctx->Current.Normal[2];
1760  break;
1762  params[0] = ctx->Current.RasterColor[0];
1763  params[1] = ctx->Current.RasterColor[1];
1764  params[2] = ctx->Current.RasterColor[2];
1765  params[3] = ctx->Current.RasterColor[3];
1766  break;
1768  params[0] = ctx->Current.RasterDistance;
1769  break;
1771  *params = (GLfloat) ctx->Current.RasterIndex;
1772  break;
1774  params[0] = ctx->Current.RasterPos[0];
1775  params[1] = ctx->Current.RasterPos[1];
1776  params[2] = ctx->Current.RasterPos[2];
1777  params[3] = ctx->Current.RasterPos[3];
1778  break;
1780  params[0] = ctx->Current.RasterTexCoord[0];
1781  params[1] = ctx->Current.RasterTexCoord[1];
1782  params[2] = ctx->Current.RasterTexCoord[2];
1783  params[3] = ctx->Current.RasterTexCoord[3];
1784  break;
1786  *params = (GLfloat) ctx->Current.RasterPosValid;
1787  break;
1789  params[0] = (GLfloat) ctx->Current.TexCoord[0];
1790  params[1] = (GLfloat) ctx->Current.TexCoord[1];
1791  params[2] = (GLfloat) ctx->Current.TexCoord[2];
1792  params[3] = (GLfloat) ctx->Current.TexCoord[3];
1793  break;
1794  case GL_DEPTH_BIAS:
1795  *params = (GLfloat) ctx->Pixel.DepthBias;
1796  break;
1797  case GL_DEPTH_BITS:
1798  *params = (GLfloat) ctx->Visual->DepthBits;
1799  break;
1800  case GL_DEPTH_CLEAR_VALUE:
1801  *params = (GLfloat) ctx->Depth.Clear;
1802  break;
1803  case GL_DEPTH_FUNC:
1804  *params = ENUM_TO_FLOAT(ctx->Depth.Func);
1805  break;
1806  case GL_DEPTH_RANGE:
1807  params[0] = (GLfloat) ctx->Viewport.Near;
1808  params[1] = (GLfloat) ctx->Viewport.Far;
1809  break;
1810  case GL_DEPTH_SCALE:
1811  *params = (GLfloat) ctx->Pixel.DepthScale;
1812  break;
1813  case GL_DEPTH_TEST:
1814  *params = (GLfloat) ctx->Depth.Test;
1815  break;
1816  case GL_DEPTH_WRITEMASK:
1817  *params = (GLfloat) ctx->Depth.Mask;
1818  break;
1819  case GL_DITHER:
1820  *params = (GLfloat) ctx->Color.DitherFlag;
1821  break;
1822  case GL_DOUBLEBUFFER:
1823  *params = (GLfloat) ctx->Visual->DBflag;
1824  break;
1825  case GL_DRAW_BUFFER:
1826  *params = ENUM_TO_FLOAT(ctx->Color.DrawBuffer);
1827  break;
1828  case GL_EDGE_FLAG:
1829  *params = (GLfloat) ctx->Current.EdgeFlag;
1830  break;
1832  /* TODO: is this right? Or, return number of entries in buffer? */
1833  *params = (GLfloat) ctx->Feedback.BufferSize;
1834  break;
1836  *params = ENUM_TO_FLOAT(ctx->Feedback.Type);
1837  break;
1838  case GL_FOG:
1839  *params = (GLfloat) ctx->Fog.Enabled;
1840  break;
1841  case GL_FOG_COLOR:
1842  params[0] = ctx->Fog.Color[0];
1843  params[1] = ctx->Fog.Color[1];
1844  params[2] = ctx->Fog.Color[2];
1845  params[3] = ctx->Fog.Color[3];
1846  break;
1847  case GL_FOG_DENSITY:
1848  *params = ctx->Fog.Density;
1849  break;
1850  case GL_FOG_END:
1851  *params = ctx->Fog.End;
1852  break;
1853  case GL_FOG_HINT:
1854  *params = ENUM_TO_FLOAT(ctx->Hint.Fog);
1855  break;
1856  case GL_FOG_INDEX:
1857  *params = ctx->Fog.Index;
1858  break;
1859  case GL_FOG_MODE:
1860  *params = ENUM_TO_FLOAT(ctx->Fog.Mode);
1861  break;
1862  case GL_FOG_START:
1863  *params = ctx->Fog.Start;
1864  break;
1865  case GL_FRONT_FACE:
1866  *params = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
1867  break;
1868  case GL_GREEN_BIAS:
1869  *params = (GLfloat) ctx->Pixel.GreenBias;
1870  break;
1871  case GL_GREEN_BITS:
1872  *params = (GLfloat) ctx->Visual->GreenBits;
1873  break;
1874  case GL_GREEN_SCALE:
1875  *params = (GLfloat) ctx->Pixel.GreenScale;
1876  break;
1877  case GL_INDEX_BITS:
1878  *params = (GLfloat) ctx->Visual->IndexBits;
1879  break;
1880  case GL_INDEX_CLEAR_VALUE:
1881  *params = (GLfloat) ctx->Color.ClearIndex;
1882  break;
1883  case GL_INDEX_MODE:
1884  *params = ctx->Visual->RGBAflag ? 0.0F : 1.0F;
1885  break;
1886  case GL_INDEX_OFFSET:
1887  *params = (GLfloat) ctx->Pixel.IndexOffset;
1888  break;
1889  case GL_INDEX_SHIFT:
1890  *params = (GLfloat) ctx->Pixel.IndexShift;
1891  break;
1892  case GL_INDEX_WRITEMASK:
1893  *params = (GLfloat) ctx->Color.IndexMask;
1894  break;
1895  case GL_LIGHT0:
1896  case GL_LIGHT1:
1897  case GL_LIGHT2:
1898  case GL_LIGHT3:
1899  case GL_LIGHT4:
1900  case GL_LIGHT5:
1901  case GL_LIGHT6:
1902  case GL_LIGHT7:
1903  *params = (GLfloat) ctx->Light.Light[pname-GL_LIGHT0].Enabled;
1904  break;
1905  case GL_LIGHTING:
1906  *params = (GLfloat) ctx->Light.Enabled;
1907  break;
1909  params[0] = ctx->Light.Model.Ambient[0];
1910  params[1] = ctx->Light.Model.Ambient[1];
1911  params[2] = ctx->Light.Model.Ambient[2];
1912  params[3] = ctx->Light.Model.Ambient[3];
1913  break;
1915  *params = (GLfloat) ctx->Light.Model.LocalViewer;
1916  break;
1918  *params = (GLfloat) ctx->Light.Model.TwoSide;
1919  break;
1920  case GL_LINE_SMOOTH:
1921  *params = (GLfloat) ctx->Line.SmoothFlag;
1922  break;
1923  case GL_LINE_SMOOTH_HINT:
1924  *params = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
1925  break;
1926  case GL_LINE_STIPPLE:
1927  *params = (GLfloat) ctx->Line.StippleFlag;
1928  break;
1930  *params = (GLfloat) ctx->Line.StipplePattern;
1931  break;
1933  *params = (GLfloat) ctx->Line.StippleFactor;
1934  break;
1935  case GL_LINE_WIDTH:
1936  *params = (GLfloat) ctx->Line.Width;
1937  break;
1940  break;
1941  case GL_LINE_WIDTH_RANGE:
1942  params[0] = (GLfloat) MIN_LINE_WIDTH;
1943  params[1] = (GLfloat) MAX_LINE_WIDTH;
1944  break;
1945  case GL_LIST_BASE:
1946  *params = (GLfloat) ctx->List.ListBase;
1947  break;
1948  case GL_LIST_INDEX:
1949  *params = (GLfloat) ctx->CurrentListNum;
1950  break;
1951  case GL_LIST_MODE:
1954  break;
1955  case GL_INDEX_LOGIC_OP:
1956  *params = (GLfloat) ctx->Color.IndexLogicOpEnabled;
1957  break;
1958  case GL_COLOR_LOGIC_OP:
1959  *params = (GLfloat) ctx->Color.ColorLogicOpEnabled;
1960  break;
1961  case GL_LOGIC_OP_MODE:
1962  *params = ENUM_TO_FLOAT(ctx->Color.LogicOp);
1963  break;
1964  case GL_MAP1_COLOR_4:
1965  *params = (GLfloat) ctx->Eval.Map1Color4;
1966  break;
1967  case GL_MAP1_GRID_DOMAIN:
1968  params[0] = ctx->Eval.MapGrid1u1;
1969  params[1] = ctx->Eval.MapGrid1u2;
1970  break;
1971  case GL_MAP1_GRID_SEGMENTS:
1972  *params = (GLfloat) ctx->Eval.MapGrid1un;
1973  break;
1974  case GL_MAP1_INDEX:
1975  *params = (GLfloat) ctx->Eval.Map1Index;
1976  break;
1977  case GL_MAP1_NORMAL:
1978  *params = (GLfloat) ctx->Eval.Map1Normal;
1979  break;
1981  *params = (GLfloat) ctx->Eval.Map1TextureCoord1;
1982  break;
1984  *params = (GLfloat) ctx->Eval.Map1TextureCoord2;
1985  break;
1987  *params = (GLfloat) ctx->Eval.Map1TextureCoord3;
1988  break;
1990  *params = (GLfloat) ctx->Eval.Map1TextureCoord4;
1991  break;
1992  case GL_MAP1_VERTEX_3:
1993  *params = (GLfloat) ctx->Eval.Map1Vertex3;
1994  break;
1995  case GL_MAP1_VERTEX_4:
1996  *params = (GLfloat) ctx->Eval.Map1Vertex4;
1997  break;
1998  case GL_MAP2_COLOR_4:
1999  *params = (GLfloat) ctx->Eval.Map2Color4;
2000  break;
2001  case GL_MAP2_GRID_DOMAIN:
2002  params[0] = ctx->Eval.MapGrid2u1;
2003  params[1] = ctx->Eval.MapGrid2u2;
2004  params[2] = ctx->Eval.MapGrid2v1;
2005  params[3] = ctx->Eval.MapGrid2v2;
2006  break;
2007  case GL_MAP2_GRID_SEGMENTS:
2008  params[0] = (GLfloat) ctx->Eval.MapGrid2un;
2009  params[1] = (GLfloat) ctx->Eval.MapGrid2vn;
2010  break;
2011  case GL_MAP2_INDEX:
2012  *params = (GLfloat) ctx->Eval.Map2Index;
2013  break;
2014  case GL_MAP2_NORMAL:
2015  *params = (GLfloat) ctx->Eval.Map2Normal;
2016  break;
2018  *params = ctx->Eval.Map2TextureCoord1;
2019  break;
2021  *params = ctx->Eval.Map2TextureCoord2;
2022  break;
2024  *params = ctx->Eval.Map2TextureCoord3;
2025  break;
2027  *params = ctx->Eval.Map2TextureCoord4;
2028  break;
2029  case GL_MAP2_VERTEX_3:
2030  *params = (GLfloat) ctx->Eval.Map2Vertex3;
2031  break;
2032  case GL_MAP2_VERTEX_4:
2033  *params = (GLfloat) ctx->Eval.Map2Vertex4;
2034  break;
2035  case GL_MAP_COLOR:
2036  *params = (GLfloat) ctx->Pixel.MapColorFlag;
2037  break;
2038  case GL_MAP_STENCIL:
2039  *params = (GLfloat) ctx->Pixel.MapStencilFlag;
2040  break;
2041  case GL_MATRIX_MODE:
2042  *params = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
2043  break;
2046  break;
2049  break;
2050  case GL_MAX_CLIP_PLANES:
2052  break;
2053  case GL_MAX_EVAL_ORDER:
2055  break;
2056  case GL_MAX_LIGHTS:
2057  *params = (GLfloat) MAX_LIGHTS;
2058  break;
2059  case GL_MAX_LIST_NESTING:
2061  break;
2064  break;
2067  break;
2070  break;
2073  break;
2074  case GL_MAX_TEXTURE_SIZE:
2076  break;
2079  break;
2080  case GL_MAX_VIEWPORT_DIMS:
2081  params[0] = (GLfloat) MAX_WIDTH;
2082  params[1] = (GLfloat) MAX_HEIGHT;
2083  break;
2084  case GL_MODELVIEW_MATRIX:
2085  for (i=0;i<16;i++) {
2086  params[i] = ctx->ModelViewMatrix[i];
2087  }
2088  break;
2091  break;
2092  case GL_NAME_STACK_DEPTH:
2093  *params = (GLfloat) ctx->Select.NameStackDepth;
2094  break;
2095  case GL_NORMALIZE:
2096  *params = (GLfloat) ctx->Transform.Normalize;
2097  break;
2098  case GL_PACK_ALIGNMENT:
2099  *params = (GLfloat) ctx->Pack.Alignment;
2100  break;
2101  case GL_PACK_LSB_FIRST:
2102  *params = (GLfloat) ctx->Pack.LsbFirst;
2103  break;
2104  case GL_PACK_ROW_LENGTH:
2105  *params = (GLfloat) ctx->Pack.RowLength;
2106  break;
2107  case GL_PACK_SKIP_PIXELS:
2108  *params = (GLfloat) ctx->Pack.SkipPixels;
2109  break;
2110  case GL_PACK_SKIP_ROWS:
2111  *params = (GLfloat) ctx->Pack.SkipRows;
2112  break;
2113  case GL_PACK_SWAP_BYTES:
2114  *params = (GLfloat) ctx->Pack.SwapBytes;
2115  break;
2117  *params = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
2118  break;
2120  *params = (GLfloat) ctx->Pixel.MapAtoAsize;
2121  break;
2123  *params = (GLfloat) ctx->Pixel.MapBtoBsize;
2124  break;
2126  *params = (GLfloat) ctx->Pixel.MapGtoGsize;
2127  break;
2129  *params = (GLfloat) ctx->Pixel.MapItoAsize;
2130  break;
2132  *params = (GLfloat) ctx->Pixel.MapItoBsize;
2133  break;
2135  *params = (GLfloat) ctx->Pixel.MapItoGsize;
2136  break;
2138  *params = (GLfloat) ctx->Pixel.MapItoIsize;
2139  break;
2141  *params = (GLfloat) ctx->Pixel.MapItoRsize;
2142  break;
2144  *params = (GLfloat) ctx->Pixel.MapRtoRsize;
2145  break;
2147  *params = (GLfloat) ctx->Pixel.MapStoSsize;
2148  break;
2149  case GL_POINT_SIZE:
2150  *params = (GLfloat) ctx->Point.Size;
2151  break;
2154  break;
2155  case GL_POINT_SIZE_RANGE:
2156  params[0] = (GLfloat) MIN_POINT_SIZE;
2157  params[1] = (GLfloat) MAX_POINT_SIZE;
2158  break;
2159  case GL_POINT_SMOOTH:
2160  *params = (GLfloat) ctx->Point.SmoothFlag;
2161  break;
2162  case GL_POINT_SMOOTH_HINT:
2163  *params = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
2164  break;
2165  case GL_POLYGON_MODE:
2166  params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
2167  params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
2168  break;
2169 #ifdef GL_EXT_polygon_offset
2171  *params = ctx->Polygon.OffsetUnits;
2172  break;
2173 #endif
2175  *params = ctx->Polygon.OffsetFactor;
2176  break;
2178  *params = ctx->Polygon.OffsetUnits;
2179  break;
2180  case GL_POLYGON_SMOOTH:
2181  *params = (GLfloat) ctx->Polygon.SmoothFlag;
2182  break;
2184  *params = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
2185  break;
2186  case GL_POLYGON_STIPPLE:
2187  for (i=0;i<32;i++) { /* RIGHT? */
2188  params[i] = (GLfloat) ctx->PolygonStipple[i];
2189  }
2190  break;
2191  case GL_PROJECTION_MATRIX:
2192  for (i=0;i<16;i++) {
2193  params[i] = ctx->ProjectionMatrix[i];
2194  }
2195  break;
2198  break;
2199  case GL_READ_BUFFER:
2200  *params = ENUM_TO_FLOAT(ctx->Pixel.ReadBuffer);
2201  break;
2202  case GL_RED_BIAS:
2203  *params = ctx->Pixel.RedBias;
2204  break;
2205  case GL_RED_BITS:
2206  *params = (GLfloat) ctx->Visual->RedBits;
2207  break;
2208  case GL_RED_SCALE:
2209  *params = ctx->Pixel.RedScale;
2210  break;
2211  case GL_RENDER_MODE:
2212  *params = ENUM_TO_FLOAT(ctx->RenderMode);
2213  break;
2214  case GL_RGBA_MODE:
2215  *params = (GLfloat) ctx->Visual->RGBAflag;
2216  break;
2217  case GL_SCISSOR_BOX:
2218  params[0] = (GLfloat) ctx->Scissor.X;
2219  params[1] = (GLfloat) ctx->Scissor.Y;
2220  params[2] = (GLfloat) ctx->Scissor.Width;
2221  params[3] = (GLfloat) ctx->Scissor.Height;
2222  break;
2223  case GL_SCISSOR_TEST:
2224  *params = (GLfloat) ctx->Scissor.Enabled;
2225  break;
2226  case GL_SHADE_MODEL:
2227  *params = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
2228  break;
2229  case GL_STENCIL_BITS:
2230  *params = (GLfloat) ctx->Visual->StencilBits;
2231  break;
2233  *params = (GLfloat) ctx->Stencil.Clear;
2234  break;
2235  case GL_STENCIL_FAIL:
2236  *params = ENUM_TO_FLOAT(ctx->Stencil.FailFunc);
2237  break;
2238  case GL_STENCIL_FUNC:
2239  *params = ENUM_TO_FLOAT(ctx->Stencil.Function);
2240  break;
2242  *params = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc);
2243  break;
2245  *params = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc);
2246  break;
2247  case GL_STENCIL_REF:
2248  *params = (GLfloat) ctx->Stencil.Ref;
2249  break;
2250  case GL_STENCIL_TEST:
2251  *params = (GLfloat) ctx->Stencil.Enabled;
2252  break;
2253  case GL_STENCIL_VALUE_MASK:
2254  *params = (GLfloat) ctx->Stencil.ValueMask;
2255  break;
2256  case GL_STENCIL_WRITEMASK:
2257  *params = (GLfloat) ctx->Stencil.WriteMask;
2258  break;
2259  case GL_STEREO:
2260  *params = 0.0F; /* TODO */
2261  break;
2262  case GL_SUBPIXEL_BITS:
2263  *params = 0.0F; /* TODO */
2264  break;
2265  case GL_TEXTURE_1D:
2266  *params = (ctx->Texture.Enabled & TEXTURE_1D) ? 1.0 : 0.0;
2267  break;
2268  case GL_TEXTURE_2D:
2269  *params = (ctx->Texture.Enabled & TEXTURE_2D) ? 1.0 : 0.0;
2270  break;
2271  case GL_TEXTURE_ENV_COLOR:
2272  params[0] = ctx->Texture.EnvColor[0];
2273  params[1] = ctx->Texture.EnvColor[1];
2274  params[2] = ctx->Texture.EnvColor[2];
2275  params[3] = ctx->Texture.EnvColor[3];
2276  break;
2277  case GL_TEXTURE_ENV_MODE:
2278  *params = ENUM_TO_FLOAT(ctx->Texture.EnvMode);
2279  break;
2280  case GL_TEXTURE_GEN_S:
2281  *params = (ctx->Texture.TexGenEnabled & S_BIT) ? 1.0 : 0.0;
2282  break;
2283  case GL_TEXTURE_GEN_T:
2284  *params = (ctx->Texture.TexGenEnabled & T_BIT) ? 1.0 : 0.0;
2285  break;
2286  case GL_TEXTURE_GEN_R:
2287  *params = (ctx->Texture.TexGenEnabled & R_BIT) ? 1.0 : 0.0;
2288  break;
2289  case GL_TEXTURE_GEN_Q:
2290  *params = (ctx->Texture.TexGenEnabled & Q_BIT) ? 1.0 : 0.0;
2291  break;
2292  case GL_TEXTURE_MATRIX:
2293  for (i=0;i<16;i++) {
2294  params[i] = ctx->TextureMatrix[i];
2295  }
2296  break;
2298  *params = (GLfloat) ctx->TextureStackDepth;
2299  break;
2300  case GL_UNPACK_ALIGNMENT:
2301  *params = (GLfloat) ctx->Unpack.Alignment;
2302  break;
2303  case GL_UNPACK_LSB_FIRST:
2304  *params = (GLfloat) ctx->Unpack.LsbFirst;
2305  break;
2306  case GL_UNPACK_ROW_LENGTH:
2307  *params = (GLfloat) ctx->Unpack.RowLength;
2308  break;
2309  case GL_UNPACK_SKIP_PIXELS:
2310  *params = (GLfloat) ctx->Unpack.SkipPixels;
2311  break;
2312  case GL_UNPACK_SKIP_ROWS:
2313  *params = (GLfloat) ctx->Unpack.SkipRows;
2314  break;
2315  case GL_UNPACK_SWAP_BYTES:
2316  *params = (GLfloat) ctx->Unpack.SwapBytes;
2317  break;
2318  case GL_VIEWPORT:
2319  params[0] = (GLfloat) ctx->Viewport.X;
2320  params[1] = (GLfloat) ctx->Viewport.Y;
2321  params[2] = (GLfloat) ctx->Viewport.Width;
2322  params[3] = (GLfloat) ctx->Viewport.Height;
2323  break;
2324  case GL_ZOOM_X:
2325  *params = (GLfloat) ctx->Pixel.ZoomX;
2326  break;
2327  case GL_ZOOM_Y:
2328  *params = (GLfloat) ctx->Pixel.ZoomY;
2329  break;
2330  case GL_VERTEX_ARRAY_SIZE:
2331  *params = (GLfloat) ctx->Array.VertexSize;
2332  break;
2333  case GL_VERTEX_ARRAY_TYPE:
2334  *params = ENUM_TO_FLOAT(ctx->Array.VertexType);
2335  break;
2337  *params = (GLfloat) ctx->Array.VertexStride;
2338  break;
2340  *params = 0.0;
2341  break;
2342  case GL_NORMAL_ARRAY_TYPE:
2343  *params = ENUM_TO_FLOAT(ctx->Array.NormalType);
2344  break;
2346  *params = (GLfloat) ctx->Array.NormalStride;
2347  break;
2349  *params = 0.0;
2350  break;
2351  case GL_COLOR_ARRAY_SIZE:
2352  *params = (GLfloat) ctx->Array.ColorSize;
2353  break;
2354  case GL_COLOR_ARRAY_TYPE:
2355  *params = ENUM_TO_FLOAT(ctx->Array.ColorType);
2356  break;
2357  case GL_COLOR_ARRAY_STRIDE:
2358  *params = (GLfloat) ctx->Array.ColorStride;
2359  break;
2361  *params = 0.0;
2362  break;
2363  case GL_INDEX_ARRAY_TYPE:
2364  *params = ENUM_TO_FLOAT(ctx->Array.IndexType);
2365  break;
2366  case GL_INDEX_ARRAY_STRIDE:
2367  *params = (GLfloat) ctx->Array.IndexStride;
2368  break;
2370  *params = 0.0;
2371  break;
2373  *params = (GLfloat) ctx->Array.TexCoordSize;
2374  break;
2376  *params = ENUM_TO_FLOAT(ctx->Array.TexCoordType);
2377  break;
2379  *params = (GLfloat) ctx->Array.TexCoordStride;
2380  break;
2382  *params = 0.0;
2383  break;
2385  *params = (GLfloat) ctx->Array.EdgeFlagStride;
2386  break;
2388  *params = 0.0;
2389  break;
2390  case GL_TEXTURE_BINDING_1D:
2391  *params = (GLfloat) ctx->Texture.Current1D->Name;
2392  break;
2393  case GL_TEXTURE_BINDING_2D:
2394  *params = (GLfloat) ctx->Texture.Current2D->Name;
2395  break;
2397  *params = (GLfloat) ctx->Texture.Current2D->Name;
2398  break;
2399 
2400  default:
2401  gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
2402  }
2403 }
2404 
2405 
2406 
2407 
2409 {
2410  GLuint i;
2411 
2412  if (INSIDE_BEGIN_END(ctx)) {
2413  gl_error( ctx, GL_INVALID_OPERATION, "glGetIntegerv" );
2414  return;
2415  }
2416  switch (pname) {
2417  case GL_ACCUM_RED_BITS:
2418  case GL_ACCUM_GREEN_BITS:
2419  case GL_ACCUM_BLUE_BITS:
2420  case GL_ACCUM_ALPHA_BITS:
2421  *params = (GLint) ctx->Visual->AccumBits;
2422  break;
2423  case GL_ACCUM_CLEAR_VALUE:
2424  params[0] = FLOAT_TO_INT( ctx->Accum.ClearColor[0] );
2425  params[1] = FLOAT_TO_INT( ctx->Accum.ClearColor[1] );
2426  params[2] = FLOAT_TO_INT( ctx->Accum.ClearColor[2] );
2427  params[3] = FLOAT_TO_INT( ctx->Accum.ClearColor[3] );
2428  break;
2429  case GL_ALPHA_BIAS:
2430  *params = (GLint) ctx->Pixel.AlphaBias;
2431  break;
2432  case GL_ALPHA_BITS:
2433  *params = ctx->Visual->AlphaBits;
2434  break;
2435  case GL_ALPHA_SCALE:
2436  *params = (GLint) ctx->Pixel.AlphaScale;
2437  break;
2438  case GL_ALPHA_TEST:
2439  *params = (GLint) ctx->Color.AlphaEnabled;
2440  break;
2441  case GL_ALPHA_TEST_REF:
2442  *params = FLOAT_TO_INT( ctx->Color.AlphaRef );
2443  break;
2444  case GL_ALPHA_TEST_FUNC:
2445  *params = (GLint) ctx->Color.AlphaFunc;
2446  break;
2447  case GL_ATTRIB_STACK_DEPTH:
2448  *params = (GLint) ctx->AttribStackDepth;
2449  break;
2450  case GL_AUTO_NORMAL:
2451  *params = (GLint) ctx->Eval.AutoNormal;
2452  break;
2453  case GL_AUX_BUFFERS:
2455  break;
2456  case GL_BLEND:
2457  *params = (GLint) ctx->Color.BlendEnabled;
2458  break;
2459  case GL_BLEND_DST:
2460  *params = (GLint) ctx->Color.BlendDst;
2461  break;
2462  case GL_BLEND_SRC:
2463  *params = (GLint) ctx->Color.BlendSrc;
2464  break;
2465  case GL_BLUE_BIAS:
2466  *params = (GLint) ctx->Pixel.BlueBias;
2467  break;
2468  case GL_BLUE_BITS:
2469  *params = (GLint) ctx->Visual->BlueBits;
2470  break;
2471  case GL_BLUE_SCALE:
2472  *params = (GLint) ctx->Pixel.BlueScale;
2473  break;
2476  break;
2477  case GL_CLIP_PLANE0:
2478  case GL_CLIP_PLANE1:
2479  case GL_CLIP_PLANE2:
2480  case GL_CLIP_PLANE3:
2481  case GL_CLIP_PLANE4:
2482  case GL_CLIP_PLANE5:
2483  i = (GLint) (pname - GL_CLIP_PLANE0);
2484  *params = (GLint) ctx->Transform.ClipEnabled[i];
2485  break;
2486  case GL_COLOR_CLEAR_VALUE:
2487  params[0] = FLOAT_TO_INT( ctx->Color.ClearColor[0] );
2488  params[1] = FLOAT_TO_INT( ctx->Color.ClearColor[1] );
2489  params[2] = FLOAT_TO_INT( ctx->Color.ClearColor[2] );
2490  params[3] = FLOAT_TO_INT( ctx->Color.ClearColor[3] );
2491  break;
2492  case GL_COLOR_MATERIAL:
2493  *params = (GLint) ctx->Light.ColorMaterialEnabled;
2494  break;
2496  *params = (GLint) ctx->Light.ColorMaterialFace;
2497  break;
2499  *params = (GLint) ctx->Light.ColorMaterialMode;
2500  break;
2501  case GL_COLOR_WRITEMASK:
2502  params[0] = (ctx->Color.ColorMask & 8) ? 1 : 0;
2503  params[1] = (ctx->Color.ColorMask & 4) ? 1 : 0;
2504  params[2] = (ctx->Color.ColorMask & 2) ? 1 : 0;
2505  params[3] = (ctx->Color.ColorMask & 1) ? 1 : 0;
2506  break;
2507  case GL_CULL_FACE:
2508  *params = (GLint) ctx->Polygon.CullFlag;
2509  break;
2510  case GL_CULL_FACE_MODE:
2511  *params = (GLint) ctx->Polygon.CullFaceMode;
2512  break;
2513  case GL_CURRENT_COLOR:
2514  params[0] = FLOAT_TO_INT( (ctx->Current.ByteColor[0]*ctx->Visual->InvRedScale) );
2515  params[1] = FLOAT_TO_INT( (ctx->Current.ByteColor[1]*ctx->Visual->InvGreenScale) );
2516  params[2] = FLOAT_TO_INT( (ctx->Current.ByteColor[2]*ctx->Visual->InvBlueScale) );
2517  params[3] = FLOAT_TO_INT( (ctx->Current.ByteColor[3]*ctx->Visual->InvAlphaScale) );
2518  break;
2519  case GL_CURRENT_INDEX:
2520  *params = (GLint) ctx->Current.Index;
2521  break;
2522  case GL_CURRENT_NORMAL:
2523  params[0] = FLOAT_TO_INT( ctx->Current.Normal[0] );
2524  params[1] = FLOAT_TO_INT( ctx->Current.Normal[1] );
2525  params[2] = FLOAT_TO_INT( ctx->Current.Normal[2] );
2526  break;
2528  params[0] = FLOAT_TO_INT( ctx->Current.RasterColor[0] );
2529  params[1] = FLOAT_TO_INT( ctx->Current.RasterColor[1] );
2530  params[2] = FLOAT_TO_INT( ctx->Current.RasterColor[2] );
2531  params[3] = FLOAT_TO_INT( ctx->Current.RasterColor[3] );
2532  break;
2534  params[0] = (GLint) ctx->Current.RasterDistance;
2535  break;
2537  *params = (GLint) ctx->Current.RasterIndex;
2538  break;
2540  params[0] = (GLint) ctx->Current.RasterPos[0];
2541  params[1] = (GLint) ctx->Current.RasterPos[1];
2542  params[2] = (GLint) ctx->Current.RasterPos[2];
2543  params[3] = (GLint) ctx->Current.RasterPos[3];
2544  break;
2546  params[0] = (GLint) ctx->Current.RasterTexCoord[0];
2547  params[1] = (GLint) ctx->Current.RasterTexCoord[1];
2548  params[2] = (GLint) ctx->Current.RasterTexCoord[2];
2549  params[3] = (GLint) ctx->Current.RasterTexCoord[3];
2550  break;
2552  *params = (GLint) ctx->Current.RasterPosValid;
2553  break;
2555  params[0] = (GLint) ctx->Current.TexCoord[0];
2556  params[1] = (GLint) ctx->Current.TexCoord[1];
2557  params[2] = (GLint) ctx->Current.TexCoord[2];
2558  params[3] = (GLint) ctx->Current.TexCoord[3];
2559  break;
2560  case GL_DEPTH_BIAS:
2561  *params = (GLint) ctx->Pixel.DepthBias;
2562  break;
2563  case GL_DEPTH_BITS:
2564  *params = ctx->Visual->DepthBits;
2565  break;
2566  case GL_DEPTH_CLEAR_VALUE:
2567  *params = (GLint) ctx->Depth.Clear;
2568  break;
2569  case GL_DEPTH_FUNC:
2570  *params = (GLint) ctx->Depth.Func;
2571  break;
2572  case GL_DEPTH_RANGE:
2573  params[0] = (GLint) ctx->Viewport.Near;
2574  params[1] = (GLint) ctx->Viewport.Far;
2575  break;
2576  case GL_DEPTH_SCALE:
2577  *params = (GLint) ctx->Pixel.DepthScale;
2578  break;
2579  case GL_DEPTH_TEST:
2580  *params = (GLint) ctx->Depth.Test;
2581  break;
2582  case GL_DEPTH_WRITEMASK:
2583  *params = (GLint) ctx->Depth.Mask;
2584  break;
2585  case GL_DITHER:
2586  *params = (GLint) ctx->Color.DitherFlag;
2587  break;
2588  case GL_DOUBLEBUFFER:
2589  *params = (GLint) ctx->Visual->DBflag;
2590  break;
2591  case GL_DRAW_BUFFER:
2592  *params = (GLint) ctx->Color.DrawBuffer;
2593  break;
2594  case GL_EDGE_FLAG:
2595  *params = (GLint) ctx->Current.EdgeFlag;
2596  break;
2598  /* TODO: is this right? Or, return number of entries in buffer? */
2599  *params = ctx->Feedback.BufferSize;
2600  break;
2602  *params = ctx->Feedback.Type;
2603  break;
2604  case GL_FOG:
2605  *params = (GLint) ctx->Fog.Enabled;
2606  break;
2607  case GL_FOG_COLOR:
2608  params[0] = FLOAT_TO_INT( ctx->Fog.Color[0] );
2609  params[1] = FLOAT_TO_INT( ctx->Fog.Color[1] );
2610  params[2] = FLOAT_TO_INT( ctx->Fog.Color[2] );
2611  params[3] = FLOAT_TO_INT( ctx->Fog.Color[3] );
2612  break;
2613  case GL_FOG_DENSITY:
2614  *params = (GLint) ctx->Fog.Density;
2615  break;
2616  case GL_FOG_END:
2617  *params = (GLint) ctx->Fog.End;
2618  break;
2619  case GL_FOG_HINT:
2620  *params = (GLint) ctx->Hint.Fog;
2621  break;
2622  case GL_FOG_INDEX:
2623  *params = (GLint) ctx->Fog.Index;
2624  break;
2625  case GL_FOG_MODE:
2626  *params = (GLint) ctx->Fog.Mode;
2627  break;
2628  case GL_FOG_START:
2629  *params = (GLint) ctx->Fog.Start;
2630  break;
2631  case GL_FRONT_FACE:
2632  *params = (GLint) ctx->Polygon.FrontFace;
2633  break;
2634  case GL_GREEN_BIAS:
2635  *params = (GLint) ctx->Pixel.GreenBias;
2636  break;
2637  case GL_GREEN_BITS:
2638  *params = (GLint) ctx->Visual->GreenBits;
2639  break;
2640  case GL_GREEN_SCALE:
2641  *params = (GLint) ctx->Pixel.GreenScale;
2642  break;
2643  case GL_INDEX_BITS:
2644  *params = (GLint) ctx->Visual->IndexBits;
2645  break;
2646  case GL_INDEX_CLEAR_VALUE:
2647  *params = (GLint) ctx->Color.ClearIndex;
2648  break;
2649  case GL_INDEX_MODE:
2650  *params = ctx->Visual->RGBAflag ? 0 : 1;
2651  break;
2652  case GL_INDEX_OFFSET:
2653  *params = ctx->Pixel.IndexOffset;
2654  break;
2655  case GL_INDEX_SHIFT:
2656  *params = ctx->Pixel.IndexShift;
2657  break;
2658  case GL_INDEX_WRITEMASK:
2659  *params = (GLint) ctx->Color.IndexMask;
2660  break;
2661  case GL_LIGHT0:
2662  case GL_LIGHT1:
2663  case GL_LIGHT2:
2664  case GL_LIGHT3:
2665  case GL_LIGHT4:
2666  case GL_LIGHT5:
2667  case GL_LIGHT6:
2668  case GL_LIGHT7:
2669  *params = (GLint) ctx->Light.Light[pname-GL_LIGHT0].Enabled;
2670  break;
2671  case GL_LIGHTING:
2672  *params = (GLint) ctx->Light.Enabled;
2673  break;
2675  params[0] = FLOAT_TO_INT( ctx->Light.Model.Ambient[0] );
2676  params[1] = FLOAT_TO_INT( ctx->Light.Model.Ambient[1] );
2677  params[2] = FLOAT_TO_INT( ctx->Light.Model.Ambient[2] );
2678  params[3] = FLOAT_TO_INT( ctx->Light.Model.Ambient[3] );
2679  break;
2681  *params = (GLint) ctx->Light.Model.LocalViewer;
2682  break;
2684  *params = (GLint) ctx->Light.Model.TwoSide;
2685  break;
2686  case GL_LINE_SMOOTH:
2687  *params = (GLint) ctx->Line.SmoothFlag;
2688  break;
2689  case GL_LINE_SMOOTH_HINT:
2690  *params = (GLint) ctx->Hint.LineSmooth;
2691  break;
2692  case GL_LINE_STIPPLE:
2693  *params = (GLint) ctx->Line.StippleFlag;
2694  break;
2696  *params = (GLint) ctx->Line.StipplePattern;
2697  break;
2699  *params = (GLint) ctx->Line.StippleFactor;
2700  break;
2701  case GL_LINE_WIDTH:
2702  *params = (GLint) ctx->Line.Width;
2703  break;
2706  break;
2707  case GL_LINE_WIDTH_RANGE:
2708  params[0] = (GLint) MIN_LINE_WIDTH;
2709  params[1] = (GLint) MAX_LINE_WIDTH;
2710  break;
2711  case GL_LIST_BASE:
2712  *params = (GLint) ctx->List.ListBase;
2713  break;
2714  case GL_LIST_INDEX:
2715  *params = (GLint) ctx->CurrentListNum;
2716  break;
2717  case GL_LIST_MODE:
2719  : (GLint) GL_COMPILE;
2720  break;
2721  case GL_INDEX_LOGIC_OP:
2722  *params = (GLint) ctx->Color.IndexLogicOpEnabled;
2723  break;
2724  case GL_COLOR_LOGIC_OP:
2725  *params = (GLint) ctx->Color.ColorLogicOpEnabled;
2726  break;
2727  case GL_LOGIC_OP_MODE:
2728  *params = (GLint) ctx->Color.LogicOp;
2729  break;
2730  case GL_MAP1_COLOR_4:
2731  *params = (GLint) ctx->Eval.Map1Color4;
2732  break;
2733  case GL_MAP1_GRID_DOMAIN:
2734  params[0] = (GLint) ctx->Eval.MapGrid1u1;
2735  params[1] = (GLint) ctx->Eval.MapGrid1u2;
2736  break;
2737  case GL_MAP1_GRID_SEGMENTS:
2738  *params = (GLint) ctx->Eval.MapGrid1un;
2739  break;
2740  case GL_MAP1_INDEX:
2741  *params = (GLint) ctx->Eval.Map1Index;
2742  break;
2743  case GL_MAP1_NORMAL:
2744  *params = (GLint) ctx->Eval.Map1Normal;
2745  break;
2747  *params = (GLint) ctx->Eval.Map1TextureCoord1;
2748  break;
2750  *params = (GLint) ctx->Eval.Map1TextureCoord2;
2751  break;
2753  *params = (GLint) ctx->Eval.Map1TextureCoord3;
2754  break;
2756  *params = (GLint) ctx->Eval.Map1TextureCoord4;
2757  break;
2758  case GL_MAP1_VERTEX_3:
2759  *params = (GLint) ctx->Eval.Map1Vertex3;
2760  break;
2761  case GL_MAP1_VERTEX_4:
2762  *params = (GLint) ctx->Eval.Map1Vertex4;
2763  break;
2764  case GL_MAP2_COLOR_4:
2765  *params = (GLint) ctx->Eval.Map2Color4;
2766  break;
2767  case GL_MAP2_GRID_DOMAIN:
2768  params[0] = (GLint) ctx->Eval.MapGrid2u1;
2769  params[1] = (GLint) ctx->Eval.MapGrid2u2;
2770  params[2] = (GLint) ctx->Eval.MapGrid2v1;
2771  params[3] = (GLint) ctx->Eval.MapGrid2v2;
2772  break;
2773  case GL_MAP2_GRID_SEGMENTS:
2774  params[0] = (GLint) ctx->Eval.MapGrid2un;
2775  params[1] = (GLint) ctx->Eval.MapGrid2vn;
2776  break;
2777  case GL_MAP2_INDEX:
2778  *params = (GLint) ctx->Eval.Map2Index;
2779  break;
2780  case GL_MAP2_NORMAL:
2781  *params = (GLint) ctx->Eval.Map2Normal;
2782  break;
2784  *params = (GLint) ctx->Eval.Map2TextureCoord1;
2785  break;
2787  *params = (GLint) ctx->Eval.Map2TextureCoord2;
2788  break;
2790  *params = (GLint) ctx->Eval.Map2TextureCoord3;
2791  break;
2793  *params = (GLint) ctx->Eval.Map2TextureCoord4;
2794  break;
2795  case GL_MAP2_VERTEX_3:
2796  *params = (GLint) ctx->Eval.Map2Vertex3;
2797  break;
2798  case GL_MAP2_VERTEX_4:
2799  *params = (GLint) ctx->Eval.Map2Vertex4;
2800  break;
2801  case GL_MAP_COLOR:
2802  *params = (GLint) ctx->Pixel.MapColorFlag;
2803  break;
2804  case GL_MAP_STENCIL:
2805  *params = (GLint) ctx->Pixel.MapStencilFlag;
2806  break;
2807  case GL_MATRIX_MODE:
2808  *params = (GLint) ctx->Transform.MatrixMode;
2809  break;
2812  break;
2815  break;
2816  case GL_MAX_CLIP_PLANES:
2818  break;
2819  case GL_MAX_EVAL_ORDER:
2821  break;
2822  case GL_MAX_LIGHTS:
2823  *params = (GLint) MAX_LIGHTS;
2824  break;
2825  case GL_MAX_LIST_NESTING:
2827  break;
2830  break;
2833  break;
2836  break;
2839  break;
2840  case GL_MAX_TEXTURE_SIZE:
2842  break;
2845  break;
2846  case GL_MAX_VIEWPORT_DIMS:
2847  params[0] = (GLint) MAX_WIDTH;
2848  params[1] = (GLint) MAX_HEIGHT;
2849  break;
2850  case GL_MODELVIEW_MATRIX:
2851  for (i=0;i<16;i++) {
2852  params[i] = (GLint) ctx->ModelViewMatrix[i];
2853  }
2854  break;
2856  *params = (GLint) ctx->ModelViewStackDepth;
2857  break;
2858  case GL_NAME_STACK_DEPTH:
2859  *params = (GLint) ctx->Select.NameStackDepth;
2860  break;
2861  case GL_NORMALIZE:
2862  *params = (GLint) ctx->Transform.Normalize;
2863  break;
2864  case GL_PACK_ALIGNMENT:
2865  *params = ctx->Pack.Alignment;
2866  break;
2867  case GL_PACK_LSB_FIRST:
2868  *params = (GLint) ctx->Pack.LsbFirst;
2869  break;
2870  case GL_PACK_ROW_LENGTH:
2871  *params = ctx->Pack.RowLength;
2872  break;
2873  case GL_PACK_SKIP_PIXELS:
2874  *params = ctx->Pack.SkipPixels;
2875  break;
2876  case GL_PACK_SKIP_ROWS:
2877  *params = ctx->Pack.SkipRows;
2878  break;
2879  case GL_PACK_SWAP_BYTES:
2880  *params = (GLint) ctx->Pack.SwapBytes;
2881  break;
2883  *params = (GLint) ctx->Hint.PerspectiveCorrection;
2884  break;
2886  *params = ctx->Pixel.MapAtoAsize;
2887  break;
2889  *params = ctx->Pixel.MapBtoBsize;
2890  break;
2892  *params = ctx->Pixel.MapGtoGsize;
2893  break;
2895  *params = ctx->Pixel.MapItoAsize;
2896  break;
2898  *params = ctx->Pixel.MapItoBsize;
2899  break;
2901  *params = ctx->Pixel.MapItoGsize;
2902  break;
2904  *params = ctx->Pixel.MapItoIsize;
2905  break;
2907  *params = ctx->Pixel.MapItoRsize;
2908  break;
2910  *params = ctx->Pixel.MapRtoRsize;
2911  break;
2913  *params = ctx->Pixel.MapStoSsize;
2914  break;
2915  case GL_POINT_SIZE:
2916  *params = (GLint) ctx->Point.Size;
2917  break;
2920  break;
2921  case GL_POINT_SIZE_RANGE:
2922  params[0] = (GLint) MIN_POINT_SIZE;
2923  params[1] = (GLint) MAX_POINT_SIZE;
2924  break;
2925  case GL_POINT_SMOOTH:
2926  *params = (GLint) ctx->Point.SmoothFlag;
2927  break;
2928  case GL_POINT_SMOOTH_HINT:
2929  *params = (GLint) ctx->Hint.PointSmooth;
2930  break;
2931  case GL_POLYGON_MODE:
2932  params[0] = (GLint) ctx->Polygon.FrontMode;
2933  params[1] = (GLint) ctx->Polygon.BackMode;
2934  break;
2935 #ifdef GL_EXT_polygon_offset
2937  *params = (GLint) ctx->Polygon.OffsetUnits;
2938  break;
2939 #endif
2941  *params = (GLint) ctx->Polygon.OffsetFactor;
2942  break;
2944  *params = (GLint) ctx->Polygon.OffsetUnits;
2945  break;
2946  case GL_POLYGON_SMOOTH:
2947  *params = (GLint) ctx->Polygon.SmoothFlag;
2948  break;
2950  *params = (GLint) ctx->Hint.PolygonSmooth;
2951  break;
2952  case GL_POLYGON_STIPPLE:
2953  for (i=0;i<32;i++) { /* RIGHT? */
2954  params[i] = (GLint) ctx->PolygonStipple[i];
2955  }
2956  break;
2957  case GL_PROJECTION_MATRIX:
2958  for (i=0;i<16;i++) {
2959  params[i] = (GLint) ctx->ProjectionMatrix[i];
2960  }
2961  break;
2963  *params = (GLint) ctx->ProjectionStackDepth;
2964  break;
2965  case GL_READ_BUFFER:
2966  *params = (GLint) ctx->Pixel.ReadBuffer;
2967  break;
2968  case GL_RED_BIAS:
2969  *params = (GLint) ctx->Pixel.RedBias;
2970  break;
2971  case GL_RED_BITS:
2972  *params = (GLint) ctx->Visual->RedBits;
2973  break;
2974  case GL_RED_SCALE:
2975  *params = (GLint) ctx->Pixel.RedScale;
2976  break;
2977  case GL_RENDER_MODE:
2978  *params = (GLint) ctx->RenderMode;
2979  break;
2980  case GL_RGBA_MODE:
2981  *params = (GLint) ctx->Visual->RGBAflag;
2982  break;
2983  case GL_SCISSOR_BOX:
2984  params[0] = (GLint) ctx->Scissor.X;
2985  params[1] = (GLint) ctx->Scissor.Y;
2986  params[2] = (GLint) ctx->Scissor.Width;
2987  params[3] = (GLint) ctx->Scissor.Height;
2988  break;
2989  case GL_SCISSOR_TEST:
2990  *params = (GLint) ctx->Scissor.Enabled;
2991  break;
2992  case GL_SHADE_MODEL:
2993  *params = (GLint) ctx->Light.ShadeModel;
2994  break;
2995  case GL_STENCIL_BITS:
2996  *params = ctx->Visual->StencilBits;
2997  break;
2999  *params = (GLint) ctx->Stencil.Clear;
3000  break;
3001  case GL_STENCIL_FAIL:
3002  *params = (GLint) ctx->Stencil.FailFunc;
3003  break;
3004  case GL_STENCIL_FUNC:
3005  *params = (GLint) ctx->Stencil.Function;
3006  break;
3008  *params = (GLint) ctx->Stencil.ZFailFunc;
3009  break;
3011  *params = (GLint) ctx->Stencil.ZPassFunc;
3012  break;
3013  case GL_STENCIL_REF:
3014  *params = (GLint) ctx->Stencil.Ref;
3015  break;
3016  case GL_STENCIL_TEST:
3017  *params = (GLint) ctx->Stencil.Enabled;
3018  break;
3019  case GL_STENCIL_VALUE_MASK:
3020  *params = (GLint) ctx->Stencil.ValueMask;
3021  break;
3022  case GL_STENCIL_WRITEMASK:
3023  *params = (GLint) ctx->Stencil.WriteMask;
3024  break;
3025  case GL_STEREO:
3026  *params = 0; /* TODO */
3027  break;
3028  case GL_SUBPIXEL_BITS:
3029  *params = 0; /* TODO */
3030  break;
3031  case GL_TEXTURE_1D:
3032  *params = (ctx->Texture.Enabled & TEXTURE_1D) ? 1.0 : 0.0;
3033  break;
3034  case GL_TEXTURE_2D:
3035  *params = (ctx->Texture.Enabled & TEXTURE_2D) ? 1.0 : 0.0;
3036  break;
3037  case GL_TEXTURE_ENV_COLOR:
3038  params[0] = FLOAT_TO_INT( ctx->Texture.EnvColor[0] );
3039  params[1] = FLOAT_TO_INT( ctx->Texture.EnvColor[1] );
3040  params[2] = FLOAT_TO_INT( ctx->Texture.EnvColor[2] );
3041  params[3] = FLOAT_TO_INT( ctx->Texture.EnvColor[3] );
3042  break;
3043  case GL_TEXTURE_ENV_MODE:
3044  *params = (GLint) ctx->Texture.EnvMode;
3045  break;
3046  case GL_TEXTURE_GEN_S:
3047  *params = (ctx->Texture.TexGenEnabled & S_BIT) ? 1 : 0;
3048  break;
3049  case GL_TEXTURE_GEN_T:
3050  *params = (ctx->Texture.TexGenEnabled & T_BIT) ? 1 : 0;
3051  break;
3052  case GL_TEXTURE_GEN_R:
3053  *params = (ctx->Texture.TexGenEnabled & R_BIT) ? 1 : 0;
3054  break;
3055  case GL_TEXTURE_GEN_Q:
3056  *params = (ctx->Texture.TexGenEnabled & Q_BIT) ? 1 : 0;
3057  break;
3058  case GL_TEXTURE_MATRIX:
3059  for (i=0;i<16;i++) {
3060  params[i] = (GLint) ctx->TextureMatrix[i];
3061  }
3062  break;
3064  *params = (GLint) ctx->TextureStackDepth;
3065  break;
3066  case GL_UNPACK_ALIGNMENT:
3067  *params = ctx->Unpack.Alignment;
3068  break;
3069  case GL_UNPACK_LSB_FIRST:
3070  *params = (GLint) ctx->Unpack.LsbFirst;
3071  break;
3072  case GL_UNPACK_ROW_LENGTH:
3073  *params = ctx->Unpack.RowLength;
3074  break;
3075  case GL_UNPACK_SKIP_PIXELS:
3076  *params = ctx->Unpack.SkipPixels;
3077  break;
3078  case GL_UNPACK_SKIP_ROWS:
3079  *params = ctx->Unpack.SkipRows;
3080  break;
3081  case GL_UNPACK_SWAP_BYTES:
3082  *params = (GLint) ctx->Unpack.SwapBytes;
3083  break;
3084  case GL_VIEWPORT:
3085  params[0] = (GLint) ctx->Viewport.X;
3086  params[1] = (GLint) ctx->Viewport.Y;
3087  params[2] = (GLint) ctx->Viewport.Width;
3088  params[3] = (GLint) ctx->Viewport.Height;
3089  break;
3090  case GL_ZOOM_X:
3091  *params = (GLint) ctx->Pixel.ZoomX;
3092  break;
3093  case GL_ZOOM_Y:
3094  *params = (GLint) ctx->Pixel.ZoomY;
3095  break;
3096  case GL_VERTEX_ARRAY_SIZE:
3097  *params = ctx->Array.VertexSize;
3098  break;
3099  case GL_VERTEX_ARRAY_TYPE:
3100  *params = ctx->Array.VertexType;
3101  break;
3103  *params = ctx->Array.VertexStride;
3104  break;
3106  *params = 0;
3107  break;
3108  case GL_NORMAL_ARRAY_TYPE:
3109  *params = ctx->Array.NormalType;
3110  break;
3112  *params = ctx->Array.NormalStride;
3113  break;
3115  *params = 0;
3116  break;
3117  case GL_COLOR_ARRAY_SIZE:
3118  *params = ctx->Array.ColorSize;
3119  break;
3120  case GL_COLOR_ARRAY_TYPE:
3121  *params = ctx->Array.ColorType;
3122  break;
3123  case GL_COLOR_ARRAY_STRIDE:
3124  *params = ctx->Array.ColorStride;
3125  break;
3127  *params = 0;
3128  break;
3129  case GL_INDEX_ARRAY_TYPE:
3130  *params = ctx->Array.IndexType;
3131  break;
3132  case GL_INDEX_ARRAY_STRIDE:
3133  *params = ctx->Array.IndexStride;
3134  break;
3136  *params = 0;
3137  break;
3139  *params = ctx->Array.TexCoordSize;
3140  break;
3142  *params = ctx->Array.TexCoordType;
3143  break;
3145  *params = ctx->Array.TexCoordStride;
3146  break;
3148  *params = 0;
3149  break;
3151  *params = ctx->Array.EdgeFlagStride;
3152  break;
3154  *params = 0;
3155  break;
3156  case GL_TEXTURE_BINDING_1D:
3157  *params = ctx->Texture.Current1D->Name;
3158  break;
3159  case GL_TEXTURE_BINDING_2D:
3160  *params = ctx->Texture.Current2D->Name;
3161  break;
3162 
3163  default:
3164  gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
3165  }
3166 }
3167 
3168 
3169 
3171 {
3172  switch (pname) {
3174  *params = ctx->Array.VertexPtr;
3175  break;
3177  *params = ctx->Array.NormalPtr;
3178  break;
3180  *params = ctx->Array.ColorPtr;
3181  break;
3183  *params = ctx->Array.IndexPtr;
3184  break;
3186  *params = ctx->Array.TexCoordPtr;
3187  break;
3189  *params = ctx->Array.EdgeFlagPtr;
3190  break;
3192  *params = ctx->Feedback.Buffer;
3193  break;
3194  default:
3195  gl_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
3196  return;
3197  }
3198 }
#define GL_NORMAL_ARRAY_COUNT_EXT
Definition: glext.h:2676
double GLdouble
Definition: gl.h:163
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define GL_FOG_DENSITY
Definition: gl.h:416
#define GL_STENCIL_FUNC
Definition: gl.h:451
#define GL_DEPTH_BITS
Definition: gl.h:302
#define GL_LIGHT2
Definition: gl.h:313
#define GL_LIST_MODE
Definition: gl.h:290
#define GL_CLIP_PLANE1
Definition: gl.h:347
#define MIN_POINT_SIZE
Definition: config.h:112
#define GL_NORMAL_ARRAY_TYPE
Definition: gl.h:211
#define GL_CLIP_PLANE3
Definition: gl.h:349
#define GL_VERTEX_ARRAY_POINTER
Definition: gl.h:222
#define GL_POINT_SMOOTH
Definition: gl.h:250
#define GL_VIEWPORT
Definition: gl.h:547
#define GL_CURRENT_RASTER_POSITION
Definition: gl.h:531
#define MAX_PIXEL_MAP_TABLE
Definition: config.h:96
#define GL_PIXEL_MAP_I_TO_I_SIZE
Definition: gl.h:607
#define GL_POLYGON_OFFSET_FACTOR
Definition: gl.h:279
#define GL_UNPACK_SWAP_BYTES
Definition: gl.h:637
#define ENUM_TO_BOOL(E)
Definition: get.c:103
GLint IndexBits
Definition: types.h:1158
#define GL_TEXTURE_COORD_ARRAY_TYPE
Definition: gl.h:219
#define GL_MAP1_COLOR_4
Definition: gl.h:551
GLboolean ExecuteFlag
Definition: types.h:1306
GLfloat ModelViewMatrix[16]
Definition: types.h:1284
#define GL_SHADE_MODEL
Definition: gl.h:337
#define GL_COLOR_ARRAY_STRIDE
Definition: gl.h:215
#define GL_BLEND
Definition: gl.h:371
#define GL_MAX_ATTRIB_STACK_DEPTH
Definition: gl.h:512
#define GL_CULL_FACE
Definition: gl.h:276
#define GL_LINE_STIPPLE_REPEAT
Definition: gl.h:259
#define GL_CURRENT_INDEX
Definition: gl.h:525
#define GL_PIXEL_MAP_S_TO_S_SIZE
Definition: gl.h:606
#define GL_CURRENT_RASTER_DISTANCE
Definition: gl.h:529
#define POINT_SIZE_GRANULARITY
Definition: config.h:114
#define GL_TEXTURE_COORD_ARRAY_SIZE
Definition: gl.h:218
#define GL_MAX_TEXTURE_SIZE
Definition: gl.h:510
#define GL_POINT_SIZE_RANGE
Definition: gl.h:253
#define GL_EDGE_FLAG_ARRAY_COUNT_EXT
Definition: glext.h:2689
#define GL_CURRENT_COLOR
Definition: gl.h:526
#define GL_FALSE
Definition: gl.h:173
#define TEXTURE_2D
Definition: types.h:895
#define GL_MAP2_GRID_SEGMENTS
Definition: gl.h:572
#define GL_FOG_HINT
Definition: gl.h:582
GLboolean RGBAflag
Definition: types.h:1137
#define GL_LINE_STIPPLE
Definition: gl.h:257
GLfloat TextureMatrix[16]
Definition: types.h:1300
#define GL_CURRENT_RASTER_INDEX
Definition: gl.h:530
GLuint CurrentListNum
Definition: types.h:1309
#define MAX_ATTRIB_STACK_DEPTH
Definition: config.h:75
#define GL_MAP1_INDEX
Definition: gl.h:552
struct gl_polygon_attrib Polygon
Definition: types.h:1330
#define GL_STENCIL_BITS
Definition: gl.h:448
struct gl_point_attrib Point
Definition: types.h:1329
#define GL_POLYGON_OFFSET_UNITS
Definition: gl.h:280
#define GL_VERTEX_ARRAY_COUNT_EXT
Definition: glext.h:2673
#define GL_PROJECTION_STACK_DEPTH
Definition: gl.h:542
#define FLOAT_TO_BOOL(X)
Definition: get.c:101
#define GL_MAP2_TEXTURE_COORD_1
Definition: gl.h:563
#define GL_MAX_EVAL_ORDER
Definition: gl.h:507
#define GL_CLIENT_ATTRIB_STACK_DEPTH
Definition: gl.h:522
#define GL_MAP_COLOR
Definition: gl.h:592
#define GL_PIXEL_MAP_I_TO_B_SIZE
Definition: gl.h:610
#define GL_FOG_END
Definition: gl.h:420
#define GL_MAX_TEXTURE_STACK_DEPTH
Definition: gl.h:516
#define GL_VERTEX_ARRAY_TYPE
Definition: gl.h:209
#define GL_ALPHA_TEST_REF
Definition: gl.h:367
#define MAX_PROJECTION_STACK_DEPTH
Definition: config.h:69
#define GL_NORMAL_ARRAY_STRIDE
Definition: gl.h:212
#define GL_LIGHT_MODEL_TWO_SIDE
Definition: gl.h:333
#define GL_MAP2_TEXTURE_COORD_4
Definition: gl.h:566
struct gl_current_attrib Current
Definition: types.h:1320
GLvisual * Visual
Definition: types.h:1272
#define GL_GREEN_SCALE
Definition: gl.h:598
#define GL_CLIP_PLANE4
Definition: gl.h:350
#define GL_PERSPECTIVE_CORRECTION_HINT
Definition: gl.h:578
#define GL_DITHER
Definition: gl.h:501
#define GL_UNPACK_SKIP_ROWS
Definition: gl.h:636
#define GL_PACK_SWAP_BYTES
Definition: gl.h:631
#define MAX_TEXTURE_STACK_DEPTH
Definition: config.h:72
#define MIN_LINE_WIDTH
Definition: config.h:117
#define GL_BLEND_SRC
Definition: gl.h:372
#define GL_COLOR_WRITEMASK
Definition: gl.h:524
#define GL_STEREO
Definition: gl.h:496
#define MAX_LIST_NESTING
Definition: config.h:81
GLuint AttribStackDepth
Definition: types.h:1314
#define GL_MAX_PROJECTION_STACK_DEPTH
Definition: gl.h:515
#define GL_PACK_ROW_LENGTH
Definition: gl.h:628
#define GL_UNPACK_ROW_LENGTH
Definition: gl.h:634
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
#define GL_LIGHT6
Definition: gl.h:317
#define GL_MAX_VIEWPORT_DIMS
Definition: gl.h:517
#define GL_MAP1_TEXTURE_COORD_2
Definition: gl.h:555
#define GL_TEXTURE_GEN_R
Definition: gl.h:653
#define ENUM_TO_DOUBLE(X)
Definition: get.c:112
#define GL_PIXEL_MAP_R_TO_R_SIZE
Definition: gl.h:612
#define GL_UNPACK_ALIGNMENT
Definition: gl.h:632
GLint AlphaBits
Definition: types.h:1156
#define GL_LINE_WIDTH
Definition: gl.h:260
#define GL_ATTRIB_STACK_DEPTH
Definition: gl.h:521
#define GL_PIXEL_MAP_I_TO_G_SIZE
Definition: gl.h:609
#define GL_RED_BIAS
Definition: gl.h:597
GLenum pname
Definition: glext.h:5645
#define LINE_WIDTH_GRANULARITY
Definition: config.h:119
#define GL_INDEX_BITS
Definition: gl.h:490
#define GL_EDGE_FLAG_ARRAY_STRIDE
Definition: gl.h:221
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define GL_MAX_LIST_NESTING
Definition: gl.h:506
#define GL_INDEX_LOGIC_OP
Definition: gl.h:427
#define GL_COLOR_ARRAY_POINTER
Definition: gl.h:224
struct gl_pixel_attrib Pixel
Definition: types.h:1328
#define GL_LIGHT0
Definition: gl.h:311
#define GL_VERTEX_ARRAY_STRIDE
Definition: gl.h:210
#define GL_BLUE_SCALE
Definition: gl.h:600
#define GL_CLIP_PLANE2
Definition: gl.h:348
GLenum const GLfloat * params
Definition: glext.h:5645
#define GL_EDGE_FLAG_ARRAY_EXT
Definition: glext.h:2669
#define GL_AUX_BUFFERS
Definition: gl.h:492
#define GL_TEXTURE_1D
Definition: gl.h:644
#define GL_LIGHT3
Definition: gl.h:314
#define GL_STENCIL_WRITEMASK
Definition: gl.h:457
#define GL_BLEND_DST
Definition: gl.h:373
#define GL_CURRENT_RASTER_COLOR
Definition: gl.h:528
#define GL_CURRENT_TEXTURE_COORDS
Definition: gl.h:534
#define GL_PROJECTION_MATRIX
Definition: gl.h:541
#define GL_LIGHT_MODEL_AMBIENT
Definition: gl.h:335
unsigned char GLboolean
Definition: gl.h:151
#define GL_INDEX_ARRAY_POINTER
Definition: gl.h:225
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
Definition: gl.h:518
#define GL_CLIP_PLANE5
Definition: gl.h:351
#define S_BIT
Definition: types.h:891
#define GL_DOUBLEBUFFER
Definition: gl.h:495
#define GL_STENCIL_PASS_DEPTH_FAIL
Definition: gl.h:454
#define GL_LIGHT1
Definition: gl.h:312
struct gl_accum_attrib Accum
Definition: types.h:1318
#define GL_DEPTH_FUNC
Definition: gl.h:304
#define GL_MAP2_INDEX
Definition: gl.h:561
#define GL_PIXEL_MAP_I_TO_A_SIZE
Definition: gl.h:611
#define MAX_LIGHTS
Definition: config.h:84
#define GL_POINT_SIZE
Definition: gl.h:251
#define GL_POLYGON_MODE
Definition: gl.h:272
#define GL_MAP2_TEXTURE_COORD_3
Definition: gl.h:565
#define GL_UNPACK_SKIP_PIXELS
Definition: gl.h:635
#define GL_DEPTH_BIAS
Definition: gl.h:605
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define GL_PACK_SKIP_ROWS
Definition: gl.h:630
#define GL_LINE_SMOOTH_HINT
Definition: gl.h:580
struct gl_colorbuffer_attrib Color
Definition: types.h:1319
#define GL_POLYGON_STIPPLE
Definition: gl.h:274
#define GL_INDEX_ARRAY_COUNT_EXT
Definition: glext.h:2683
#define GL_INDEX_MODE
Definition: gl.h:536
#define GL_POINT_SMOOTH_HINT
Definition: gl.h:579
#define GL_TEXTURE_GEN_Q
Definition: gl.h:654
#define GL_TEXTURE_BINDING_1D
Definition: gl.h:730
#define GL_LOGIC_OP_MODE
Definition: gl.h:429
#define MAX_EVAL_ORDER
Definition: config.h:105
#define GL_LINE_WIDTH_RANGE
Definition: gl.h:262
struct gl_fog_attrib Fog
Definition: types.h:1323
#define GL_INDEX_ARRAY_STRIDE
Definition: gl.h:217
#define GL_UNPACK_LSB_FIRST
Definition: gl.h:633
#define GL_FOG_MODE
Definition: gl.h:415
#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT
Definition: glext.h:2687
#define GL_LIST_INDEX
Definition: gl.h:289
GLenum RenderMode
Definition: types.h:1356
GLint BlueBits
Definition: types.h:1155
struct gl_scissor_attrib Scissor
Definition: types.h:1332
#define GL_SCISSOR_TEST
Definition: gl.h:589
#define R_BIT
Definition: types.h:890
GLuint ProjectionStackDepth
Definition: types.h:1293
struct gl_texture_attrib Texture
Definition: types.h:1334
#define FLOAT_TO_INT(X)
Definition: macros.h:222
#define GL_RED_SCALE
Definition: gl.h:596
GLint GreenBits
Definition: types.h:1154
struct gl_eval_attrib Eval
Definition: types.h:1322
GLfloat InvRedScale
Definition: types.h:1148
#define MAX_HEIGHT
Definition: config.h:131
void gl_GetBooleanv(GLcontext *ctx, GLenum pname, GLboolean *params)
Definition: get.c:117
#define GL_RENDER_MODE
Definition: gl.h:543
void gl_GetDoublev(GLcontext *ctx, GLenum pname, GLdouble *params)
Definition: get.c:880
#define MAX_CLIP_PLANES
Definition: config.h:87
GLint AccumBits
Definition: types.h:1160
#define GL_CURRENT_RASTER_TEXTURE_COORDS
Definition: gl.h:532
#define GL_LIGHT_MODEL_LOCAL_VIEWER
Definition: gl.h:334
#define GL_INDEX_ARRAY_TYPE
Definition: gl.h:216
#define GL_FOG_INDEX
Definition: gl.h:418
#define GL_FOG_COLOR
Definition: gl.h:417
#define GL_MAP1_TEXTURE_COORD_3
Definition: gl.h:556
#define GL_MAP1_TEXTURE_COORD_1
Definition: gl.h:554
#define GL_TEXTURE_ENV_MODE
Definition: gl.h:643
#define GL_MAP1_NORMAL
Definition: gl.h:553
#define GL_FEEDBACK_BUFFER_POINTER
Definition: gl.h:405
#define MAX_WIDTH
Definition: config.h:130
#define GL_MAP2_NORMAL
Definition: gl.h:562
#define GL_STENCIL_TEST
Definition: gl.h:449
#define GL_INDEX_WRITEMASK
Definition: gl.h:537
#define GL_ALPHA_TEST_FUNC
Definition: gl.h:368
#define GL_SUBPIXEL_BITS
Definition: gl.h:491
#define GL_MODELVIEW_MATRIX
Definition: gl.h:538
#define GL_STENCIL_REF
Definition: gl.h:456
#define GL_MATRIX_MODE
Definition: gl.h:244
#define GL_MAP1_TEXTURE_COORD_4
Definition: gl.h:557
#define GL_DEPTH_SCALE
Definition: gl.h:604
#define GL_STENCIL_CLEAR_VALUE
Definition: gl.h:450
#define GL_CLIP_PLANE0
Definition: gl.h:346
#define for
Definition: utility.h:88
#define GL_LIGHT5
Definition: gl.h:316
#define GL_COLOR_MATERIAL
Definition: gl.h:340
#define GL_LIGHTING
Definition: gl.h:310
#define GL_COMPILE_AND_EXECUTE
Definition: gl.h:287
#define GL_DEPTH_WRITEMASK
Definition: gl.h:306
#define GL_MAP2_COLOR_4
Definition: gl.h:560
#define GL_LIST_BASE
Definition: gl.h:288
struct gl_pixelstore_attrib Pack
Definition: types.h:1343
#define GL_READ_BUFFER
Definition: gl.h:493
GLint StencilBits
Definition: types.h:1162
#define GL_ACCUM_RED_BITS
Definition: gl.h:354
#define GL_INDEX_OFFSET
Definition: gl.h:595
#define GL_DRAW_BUFFER
Definition: gl.h:494
struct gl_transform_attrib Transform
Definition: types.h:1335
#define GL_LINE_SMOOTH
Definition: gl.h:256
#define GL_PIXEL_MAP_G_TO_G_SIZE
Definition: gl.h:613
#define GL_POINT_SIZE_GRANULARITY
Definition: gl.h:252
#define GL_AUTO_NORMAL
Definition: gl.h:550
#define MAX_CLIENT_ATTRIB_STACK_DEPTH
Definition: config.h:78
#define GL_POLYGON_SMOOTH_HINT
Definition: gl.h:581
#define GL_PACK_SKIP_PIXELS
Definition: gl.h:629
#define GL_LINE_WIDTH_GRANULARITY
Definition: gl.h:261
#define GL_TEXTURE_3D_BINDING_EXT
Definition: glext.h:2604
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_MAP1_GRID_SEGMENTS
Definition: gl.h:570
#define GL_MAX_MODELVIEW_STACK_DEPTH
Definition: gl.h:513
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define T_BIT
Definition: types.h:892
#define TEXTURE_1D
Definition: types.h:894
#define GL_DEPTH_RANGE
Definition: gl.h:305
#define GL_EDGE_FLAG
Definition: gl.h:275
#define GL_SCISSOR_BOX
Definition: gl.h:588
#define GL_FEEDBACK_BUFFER_SIZE
Definition: gl.h:406
#define GL_TEXTURE_BINDING_2D
Definition: gl.h:731
#define GL_CULL_FACE_MODE
Definition: gl.h:277
#define GL_CURRENT_NORMAL
Definition: gl.h:527
#define GL_TEXTURE_STACK_DEPTH
Definition: gl.h:546
#define GL_INDEX_CLEAR_VALUE
Definition: gl.h:535
#define GL_ALPHA_BIAS
Definition: gl.h:603
#define GL_FOG
Definition: gl.h:414
GLuint ModelViewStackDepth
Definition: types.h:1286
#define MAX_POINT_SIZE
Definition: config.h:113
unsigned int GLenum
Definition: gl.h:150
#define GL_STENCIL_VALUE_MASK
Definition: gl.h:452
#define GL_COLOR_CLEAR_VALUE
Definition: gl.h:523
#define INT_TO_BOOL(I)
Definition: get.c:102
#define GL_EDGE_FLAG_ARRAY_POINTER
Definition: gl.h:227
#define GL_TEXTURE_COORD_ARRAY_STRIDE
Definition: gl.h:220
#define GL_ACCUM_GREEN_BITS
Definition: gl.h:355
#define GL_LINE_STIPPLE_PATTERN
Definition: gl.h:258
#define ENUM_TO_FLOAT(X)
Definition: get.c:111
void gl_GetIntegerv(GLcontext *ctx, GLenum pname, GLint *params)
Definition: get.c:2408
#define GL_POLYGON_OFFSET_BIAS_EXT
Definition: glext.h:2417
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define GL_NORMALIZE
Definition: gl.h:343
#define GL_STENCIL_PASS_DEPTH_PASS
Definition: gl.h:455
GLuint PolygonStipple[32]
Definition: types.h:1331
#define GL_POLYGON_SMOOTH
Definition: gl.h:273
#define GL_VERTEX_ARRAY_SIZE
Definition: gl.h:208
struct gl_hint_attrib Hint
Definition: types.h:1324
struct gl_depthbuffer_attrib Depth
Definition: types.h:1321
#define GL_COLOR_ARRAY_TYPE
Definition: gl.h:214
unsigned int GLuint
Definition: gl.h:159
#define GL_DEPTH_CLEAR_VALUE
Definition: gl.h:303
struct gl_pixelstore_attrib Unpack
Definition: types.h:1344
#define GL_DEPTH_TEST
Definition: gl.h:301
#define GL_ACCUM_ALPHA_BITS
Definition: gl.h:357
#define GL_BLUE_BIAS
Definition: gl.h:601
#define GL_TEXTURE_GEN_S
Definition: gl.h:651
#define GL_TRUE
Definition: gl.h:174
struct gl_array_attrib Array
Definition: types.h:1342
#define GL_MAX_PIXEL_MAP_TABLE
Definition: gl.h:511
#define GL_CURRENT_RASTER_POSITION_VALID
Definition: gl.h:533
#define GL_PACK_LSB_FIRST
Definition: gl.h:627
struct gl_stencil_attrib Stencil
Definition: types.h:1333
#define GL_NAME_STACK_DEPTH
Definition: gl.h:540
GLfloat InvBlueScale
Definition: types.h:1150
#define GL_RED_BITS
Definition: gl.h:487
#define GL_INVALID_ENUM
Definition: gl.h:694
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
#define GL_NORMAL_ARRAY_POINTER
Definition: gl.h:223
struct gl_viewport_attrib Viewport
Definition: types.h:1336
#define GL_MAP_STENCIL
Definition: gl.h:593
#define GL_COLOR_MATERIAL_PARAMETER
Definition: gl.h:342
#define GL_BLUE_BITS
Definition: gl.h:489
#define GL_GREEN_BITS
Definition: gl.h:488
#define GL_LIGHT7
Definition: gl.h:318
#define GL_ZOOM_Y
Definition: gl.h:639
#define GL_PIXEL_MAP_I_TO_R_SIZE
Definition: gl.h:608
#define GL_ACCUM_BLUE_BITS
Definition: gl.h:356
#define GL_ALPHA_TEST
Definition: gl.h:366
#define GL_TEXTURE_2D
Definition: gl.h:645
#define GL_PACK_ALIGNMENT
Definition: gl.h:626
#define NUM_AUX_BUFFERS
Definition: config.h:99
GLuint ClientAttribStackDepth
Definition: types.h:1339
struct gl_selection Select
Definition: types.h:1348
void gl_GetFloatv(GLcontext *ctx, GLenum pname, GLfloat *params)
Definition: get.c:1643
float GLfloat
Definition: gl.h:161
GLuint TextureStackDepth
Definition: types.h:1301
#define GL_FRONT_FACE
Definition: gl.h:278
#define GL_COLOR_ARRAY_COUNT_EXT
Definition: glext.h:2680
#define GL_COLOR_ARRAY_SIZE
Definition: gl.h:213
struct gl_list_attrib List
Definition: types.h:1327
#define GL_COMPILE
Definition: gl.h:286
GLfloat InvGreenScale
Definition: types.h:1149
#define GL_MAX_NAME_STACK_DEPTH
Definition: gl.h:514
GLfloat ProjectionMatrix[16]
Definition: types.h:1292
#define GL_GREEN_BIAS
Definition: gl.h:599
#define GL_STENCIL_FAIL
Definition: gl.h:453
GLboolean DBflag
Definition: types.h:1138
#define GL_MAX_CLIP_PLANES
Definition: gl.h:509
#define GL_MODELVIEW_STACK_DEPTH
Definition: gl.h:539
int GLint
Definition: gl.h:156
GLint RedBits
Definition: types.h:1153
#define GL_FEEDBACK_BUFFER_TYPE
Definition: gl.h:407
#define GL_ACCUM_CLEAR_VALUE
Definition: gl.h:358
#define GL_LIGHT4
Definition: gl.h:315
#define GL_MAP2_GRID_DOMAIN
Definition: gl.h:571
#define GL_TEXTURE_GEN_T
Definition: gl.h:652
#define GL_COLOR_MATERIAL_FACE
Definition: gl.h:341
void gl_GetPointerv(GLcontext *ctx, GLenum pname, GLvoid **params)
Definition: get.c:3170
struct gl_light_attrib Light
Definition: types.h:1325
GLfloat InvAlphaScale
Definition: types.h:1151
#define GL_MAP2_TEXTURE_COORD_2
Definition: gl.h:564
#define GL_MAX_LIGHTS
Definition: gl.h:508
#define GL_COLOR_LOGIC_OP
Definition: gl.h:428
#define GL_ALPHA_SCALE
Definition: gl.h:602
#define MAX_NAME_STACK_DEPTH
Definition: config.h:109
#define MAX_TEXTURE_SIZE
Definition: config.h:93
#define GL_PIXEL_MAP_B_TO_B_SIZE
Definition: gl.h:614
#define GL_FOG_START
Definition: gl.h:419
GLint DepthBits
Definition: types.h:1161
#define MAX_MODELVIEW_STACK_DEPTH
Definition: config.h:66
#define GL_PIXEL_MAP_A_TO_A_SIZE
Definition: gl.h:615
#define GL_RGBA_MODE
Definition: gl.h:544
#define GL_MAP1_GRID_DOMAIN
Definition: gl.h:569
#define GL_TEXTURE_MATRIX
Definition: gl.h:545
#define F(x, y, z)
Definition: md5.c:51
#define GL_TEXTURE_ENV_COLOR
Definition: gl.h:650
struct gl_line_attrib Line
Definition: types.h:1326
#define GL_ZOOM_X
Definition: gl.h:638
#define GL_TEXTURE_COORD_ARRAY_POINTER
Definition: gl.h:226
struct gl_feedback Feedback
Definition: types.h:1347
#define GL_ALPHA_BITS
Definition: gl.h:486
#define MAX_LINE_WIDTH
Definition: config.h:118
#define GL_INDEX_SHIFT
Definition: gl.h:594
#define Q_BIT
Definition: types.h:889