2 From: Steve Baker <sbaker@link.com>
3 Sender: root@fatcity.com
4 To: OPENGL-GAMEDEV-L <OPENGL-GAMEDEV-L@fatcity.com>
5 Subject: Re: Win32 OpenGL Resource Page
6 Date: Fri, 24 Apr 1998 07:33:51 -0800
24 void getPrints ( GLenum token, char *string )
26 printf ( "%s = \"%s\"\n", string, glGetString ( token ) ) ;
29 void getPrint2f ( GLenum token, char *string )
32 glGetFloatv ( token, f ) ;
33 printf ( "%s = %g,%g\n", string, f[0],f[1] ) ;
36 void getPrintf ( GLenum token, char *string )
39 glGetFloatv ( token, &f ) ;
40 printf ( "%s = %g\n", string, f ) ;
43 void getPrint2i ( GLenum token, char *string )
46 glGetIntegerv ( token, i ) ;
47 printf ( "%s = %d,%d\n", string, i[0],i[1] ) ;
50 void getPrinti ( GLenum token, char *string )
53 glGetIntegerv ( token, &i ) ;
54 printf ( "%s = %d\n", string, i ) ;
57 int main ( int argc, char **argv )
59 glutInit ( &argc, argv ) ;
60 glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ;
61 glutCreateWindow ( "You should never see this window!" ) ;
63 getPrints ( GL_VENDOR , "GL_VENDOR" ) ;
64 getPrints ( GL_RENDERER , "GL_RENDERER" ) ;
65 getPrints ( GL_VERSION , "GL_VERSION" ) ;
66 getPrints ( GL_EXTENSIONS , "GL_EXTENSIONS" ) ;
68 getPrinti ( GL_RED_BITS , "GL_RED_BITS" ) ;
69 getPrinti ( GL_GREEN_BITS , "GL_GREEN_BITS" ) ;
70 getPrinti ( GL_BLUE_BITS , "GL_BLUE_BITS" ) ;
71 getPrinti ( GL_ALPHA_BITS , "GL_ALPHA_BITS" ) ;
72 getPrinti ( GL_DEPTH_BITS , "GL_DEPTH_BITS" ) ;
73 getPrinti ( GL_INDEX_BITS , "GL_INDEX_BITS" ) ;
74 getPrinti ( GL_STENCIL_BITS, "GL_STENCIL_BITS" ) ;
76 getPrinti ( GL_ACCUM_RED_BITS , "GL_ACCUM_RED_BITS" ) ;
77 getPrinti ( GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS" ) ;
78 getPrinti ( GL_ACCUM_BLUE_BITS , "GL_ACCUM_BLUE_BITS" ) ;
79 getPrinti ( GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS" ) ;
81 getPrinti ( GL_AUX_BUFFERS, "GL_AUX_BUFFERS" ) ;
83 getPrinti ( GL_MAX_ATTRIB_STACK_DEPTH , "GL_MAX_ATTRIB_STACK_DEPTH" ) ;
84 getPrinti ( GL_MAX_NAME_STACK_DEPTH , "GL_MAX_NAME_STACK_DEPTH" ) ;
85 getPrinti ( GL_MAX_TEXTURE_STACK_DEPTH , "GL_MAX_TEXTURE_STACK_DEPTH" ) ;
86 getPrinti ( GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH" ) ;
87 getPrinti ( GL_MAX_MODELVIEW_STACK_DEPTH , "GL_MAX_MODELVIEW_STACK_DEPTH" ) ;
89 getPrinti ( GL_MAX_CLIP_PLANES , "GL_MAX_CLIP_PLANES" ) ;
90 getPrinti ( GL_MAX_EVAL_ORDER , "GL_MAX_EVAL_ORDER" ) ;
91 getPrinti ( GL_MAX_LIGHTS , "GL_MAX_LIGHTS" ) ;
92 getPrinti ( GL_MAX_LIST_NESTING , "GL_MAX_LIST_NESTING" ) ;
93 getPrinti ( GL_MAX_TEXTURE_SIZE , "GL_MAX_TEXTURE_SIZE" ) ;
94 getPrint2i( GL_MAX_VIEWPORT_DIMS , "GL_MAX_VIEWPORT_DIMS" ) ;
96 getPrintf ( GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY" ) ;
97 getPrint2f( GL_POINT_SIZE_RANGE , "GL_POINT_SIZE_RANGE" ) ;
99 printf("Default values:\n\n");
101 getPrinti( GL_UNPACK_ALIGNMENT , "GL_UNPACK_ALIGNMENT" ) ;
102 getPrinti( GL_UNPACK_ROW_LENGTH , "GL_UNPACK_ROW_LENGTH" ) ;
103 getPrinti( GL_UNPACK_SKIP_PIXELS , "GL_UNPACK_SKIP_PIXELS" ) ;
104 getPrinti( GL_UNPACK_SKIP_ROWS , "GL_UNPACK_SKIP_ROWS" ) ;
105 getPrinti( GL_BLEND_SRC , "GL_BLEND_SRC" ) ;
106 getPrinti( GL_BLEND_DST , "GL_BLEND_DST" ) ;