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
21 #include <simgear/compiler.h>
22 #if defined( __APPLE__)
23 # include <OpenGL/OpenGL.h>
24 # include <GLUT/glut.h>
33 void getPrints ( GLenum token, char *string )
35 printf ( "%s = \"%s\"\n", string, glGetString ( token ) ) ;
38 void getPrint2f ( GLenum token, char *string )
41 glGetFloatv ( token, f ) ;
42 printf ( "%s = %g,%g\n", string, f[0],f[1] ) ;
45 void getPrintf ( GLenum token, char *string )
48 glGetFloatv ( token, &f ) ;
49 printf ( "%s = %g\n", string, f ) ;
52 void getPrint2i ( GLenum token, char *string )
55 glGetIntegerv ( token, i ) ;
56 printf ( "%s = %d,%d\n", string, i[0],i[1] ) ;
59 void getPrinti ( GLenum token, char *string )
62 glGetIntegerv ( token, &i ) ;
63 printf ( "%s = %d\n", string, i ) ;
66 int main ( int argc, char **argv )
69 glutInit ( &argc, argv ) ;
70 glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ;
71 glutCreateWindow ( "You should never see this window!" ) ;
73 getPrints ( GL_VENDOR , "GL_VENDOR" ) ;
74 getPrints ( GL_RENDERER , "GL_RENDERER" ) ;
75 getPrints ( GL_VERSION , "GL_VERSION" ) ;
76 getPrints ( GL_EXTENSIONS , "GL_EXTENSIONS" ) ;
78 getPrinti ( GL_RED_BITS , "GL_RED_BITS" ) ;
79 getPrinti ( GL_GREEN_BITS , "GL_GREEN_BITS" ) ;
80 getPrinti ( GL_BLUE_BITS , "GL_BLUE_BITS" ) ;
81 getPrinti ( GL_ALPHA_BITS , "GL_ALPHA_BITS" ) ;
82 getPrinti ( GL_DEPTH_BITS , "GL_DEPTH_BITS" ) ;
83 getPrinti ( GL_INDEX_BITS , "GL_INDEX_BITS" ) ;
84 getPrinti ( GL_STENCIL_BITS, "GL_STENCIL_BITS" ) ;
86 getPrinti ( GL_ACCUM_RED_BITS , "GL_ACCUM_RED_BITS" ) ;
87 getPrinti ( GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS" ) ;
88 getPrinti ( GL_ACCUM_BLUE_BITS , "GL_ACCUM_BLUE_BITS" ) ;
89 getPrinti ( GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS" ) ;
91 getPrinti ( GL_AUX_BUFFERS, "GL_AUX_BUFFERS" ) ;
93 getPrinti ( GL_MAX_ATTRIB_STACK_DEPTH , "GL_MAX_ATTRIB_STACK_DEPTH" ) ;
94 getPrinti ( GL_MAX_NAME_STACK_DEPTH , "GL_MAX_NAME_STACK_DEPTH" ) ;
95 getPrinti ( GL_MAX_TEXTURE_STACK_DEPTH , "GL_MAX_TEXTURE_STACK_DEPTH" ) ;
96 getPrinti ( GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH" ) ;
97 getPrinti ( GL_MAX_MODELVIEW_STACK_DEPTH , "GL_MAX_MODELVIEW_STACK_DEPTH" ) ;
99 getPrinti ( GL_MAX_CLIP_PLANES , "GL_MAX_CLIP_PLANES" ) ;
100 getPrinti ( GL_MAX_EVAL_ORDER , "GL_MAX_EVAL_ORDER" ) ;
101 getPrinti ( GL_MAX_LIGHTS , "GL_MAX_LIGHTS" ) ;
102 getPrinti ( GL_MAX_LIST_NESTING , "GL_MAX_LIST_NESTING" ) ;
103 getPrinti ( GL_MAX_TEXTURE_SIZE , "GL_MAX_TEXTURE_SIZE" ) ;
104 getPrint2i( GL_MAX_VIEWPORT_DIMS , "GL_MAX_VIEWPORT_DIMS" ) ;
106 getPrintf ( GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY" ) ;
107 getPrint2f( GL_POINT_SIZE_RANGE , "GL_POINT_SIZE_RANGE" ) ;
109 printf("Default values:\n\n");
111 getPrinti( GL_UNPACK_ALIGNMENT , "GL_UNPACK_ALIGNMENT" ) ;
112 getPrinti( GL_UNPACK_ROW_LENGTH , "GL_UNPACK_ROW_LENGTH" ) ;
113 getPrinti( GL_UNPACK_SKIP_PIXELS , "GL_UNPACK_SKIP_PIXELS" ) ;
114 getPrinti( GL_UNPACK_SKIP_ROWS , "GL_UNPACK_SKIP_ROWS" ) ;
115 getPrinti( GL_BLEND_SRC , "GL_BLEND_SRC" ) ;
116 getPrinti( GL_BLEND_DST , "GL_BLEND_DST" ) ;
119 printf("GL Utility Toolkit (glut) was not found on this system.\n");