| //======================================================================== |
| // This is a small test application for GLFW. |
| // The program lists all available fullscreen video modes. |
| //======================================================================== |
| static void print_mode(GLFWvidmode* mode) |
| printf("%i x %i x %i (%i %i %i)\n", |
| mode->width, mode->height, |
| mode->redBits + mode->greenBits + mode->blueBits, |
| mode->redBits, mode->greenBits, mode->blueBits); |
| GLFWvidmode dtmode, modes[400]; |
| fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError())); |
| // Show desktop video mode |
| glfwGetDesktopMode(&dtmode); |
| printf("Desktop mode: "); |
| // List available video modes |
| modecount = glfwGetVideoModes(modes, sizeof(modes) / sizeof(GLFWvidmode)); |
| printf("Available modes:\n"); |
| for (i = 0; i < modecount; i++) |