3 void glGetIntegerv(int pname
,int *params
)
5 GLContext
*c
=gl_get_context();
9 params
[0]=c
->viewport
.xmin
;
10 params
[1]=c
->viewport
.ymin
;
11 params
[2]=c
->viewport
.xsize
;
12 params
[3]=c
->viewport
.ysize
;
14 case GL_MAX_MODELVIEW_STACK_DEPTH
:
15 *params
= MAX_MODELVIEW_STACK_DEPTH
;
17 case GL_MAX_PROJECTION_STACK_DEPTH
:
18 *params
= MAX_PROJECTION_STACK_DEPTH
;
23 case GL_MAX_TEXTURE_SIZE
:
24 *params
= 256; /* not completely true, but... */
26 case GL_MAX_TEXTURE_STACK_DEPTH
:
27 *params
= MAX_TEXTURE_STACK_DEPTH
;
30 gl_fatal_error("glGet: option not implemented");
35 void glGetFloatv(int pname
, float *v
)
38 int mnr
= 0; /* just a trick to return the correct matrix */
39 GLContext
*c
= gl_get_context();
41 case GL_TEXTURE_MATRIX
:
43 case GL_PROJECTION_MATRIX
:
45 case GL_MODELVIEW_MATRIX
:
47 float *p
= &c
->matrix_stack_ptr
[mnr
]->m
[0][0];;
48 for (i
= 0; i
< 4; i
++) {
60 case GL_LINE_WIDTH_RANGE
:
66 case GL_POINT_SIZE_RANGE
:
69 fprintf(stderr
,"warning: unknown pname in glGetFloatv()\n");