1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 18:28:52 -05:00

Removed listmodes test.

This commit is contained in:
Camilla Berglund 2012-05-07 00:34:40 +02:00
parent 93c3d52716
commit e55b5fc27c
2 changed files with 1 additions and 49 deletions

View File

@ -21,7 +21,6 @@ add_executable(gamma gamma.c getopt.c)
add_executable(glfwinfo glfwinfo.c getopt.c)
add_executable(iconify iconify.c getopt.c)
add_executable(joysticks joysticks.c)
add_executable(listmodes listmodes.c)
add_executable(modes modes.c getopt.c)
add_executable(peter peter.c)
add_executable(reopen reopen.c)
@ -43,7 +42,7 @@ set_target_properties(windows PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Windows")
set(WINDOWS_BINARIES accuracy sharing tearing title windows)
set(CONSOLE_BINARIES clipboard defaults events fsaa fsfocus gamma glfwinfo
iconify joysticks listmodes modes peter reopen)
iconify joysticks modes peter reopen)
if (MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables

View File

@ -1,47 +0,0 @@
//========================================================================
// This is a small test application for GLFW.
// The program lists all available fullscreen video modes.
//========================================================================
#include <GL/glfw3.h>
#include <stdio.h>
#include <stdlib.h>
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);
}
int main(void)
{
GLFWvidmode dtmode, modes[400];
int modecount, i;
if (!glfwInit())
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
}
// Show desktop video mode
glfwGetDesktopMode(&dtmode);
printf("Desktop mode: ");
print_mode(&dtmode);
// List available video modes
modecount = glfwGetVideoModes(modes, sizeof(modes) / sizeof(GLFWvidmode));
printf("Available modes:\n");
for (i = 0; i < modecount; i++)
{
printf("%3i: ", i);
print_mode(modes + i);
}
glfwTerminate();
exit(EXIT_SUCCESS);
}