/* Prints out the limits of the current OpenGL implementation. Yes, you need to create a window in order to get the proper results from glGet*; if you don't, you'll get huge values that change each time. Implemented Fall 2003 Scott D. Anderson */ #include #include void report(char type, char* name, int value) { GLfloat floatv[16]; GLint intv[16]; switch (type) { case 'f': glGetFloatv(value,floatv); twError(); printf("%s is %f\n",name,floatv); break; case 'i': glGetIntegerv(value,intv); twError(); printf("%s is %d\n",name,intv[0]); break; } } void display(void) { } int main(int argc, char** argv) { GLint intv[16]; glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_ACCUM); glutInitWindowSize(50,50); glutCreateWindow(argv[0]); glutDisplayFunc(display); report('i',"GL_MAX_LIGHTS",GL_MAX_LIGHTS); printf("Depth of Frame Buffer\n"); report('i',"GL_RED_BITS",GL_RED_BITS); report('i',"GL_GREEN_BITS",GL_GREEN_BITS); report('i',"GL_BLUE_BITS",GL_BLUE_BITS); report('i',"GL_ALPHA_BITS",GL_ALPHA_BITS); printf("Depth of Depth Buffer\n"); report('i',"GL_DEPTH_BITS",GL_DEPTH_BITS); printf("Depth of Accumulation Buffer\n"); report('i',"GL_ACCUM_RED_BITS",GL_ACCUM_RED_BITS); report('i',"GL_ACCUM_GREEN_BITS",GL_ACCUM_GREEN_BITS); report('i',"GL_ACCUM_BLUE_BITS",GL_ACCUM_BLUE_BITS); report('i',"GL_ACCUM_ALPHA_BITS",GL_ACCUM_ALPHA_BITS); //glutMainLoop(); return 0; }