diff --git a/examples/boing.c b/examples/boing.c index f6a22fa2..721c40aa 100644 --- a/examples/boing.c +++ b/examples/boing.c @@ -577,7 +577,7 @@ int main( void ) glfwOpenWindowHint(GLFW_DEPTH_BITS, 16); - window = glfwOpenWindow( 400, 400, GLFW_WINDOWED ); + window = glfwOpenWindow( 400, 400, GLFW_WINDOWED, "Boing (classic Amiga demo)" ); if (!window) { fprintf( stderr, "Failed to open GLFW window\n" ); @@ -585,7 +585,6 @@ int main( void ) exit( EXIT_FAILURE ); } - glfwSetWindowTitle( window, "Boing (classic Amiga demo)" ); glfwSetWindowSizeCallback( window, reshape ); glfwEnable( window, GLFW_STICKY_KEYS ); glfwSwapInterval( 1 ); diff --git a/examples/gears.c b/examples/gears.c index a7eadc21..36b45710 100644 --- a/examples/gears.c +++ b/examples/gears.c @@ -331,7 +331,7 @@ int main(int argc, char *argv[]) glfwOpenWindowHint(GLFW_DEPTH_BITS, 16); - window = glfwOpenWindow( 300, 300, GLFW_WINDOWED ); + window = glfwOpenWindow( 300, 300, GLFW_WINDOWED, "Gears" ); if (!window) { fprintf( stderr, "Failed to open GLFW window\n" ); @@ -339,7 +339,6 @@ int main(int argc, char *argv[]) exit( EXIT_FAILURE ); } - glfwSetWindowTitle( window, "Gears" ); glfwEnable( window, GLFW_KEY_REPEAT ); glfwSwapInterval( 1 ); diff --git a/examples/splitview.c b/examples/splitview.c index 122cafc2..a3d9589a 100644 --- a/examples/splitview.c +++ b/examples/splitview.c @@ -460,7 +460,7 @@ int main( void ) glfwOpenWindowHint(GLFW_DEPTH_BITS, 16); // Open OpenGL window - window = glfwOpenWindow( 500, 500, GLFW_WINDOWED ); + window = glfwOpenWindow( 500, 500, GLFW_WINDOWED, "Split view demo" ); if (!window) { fprintf( stderr, "Failed to open GLFW window\n" ); @@ -471,9 +471,6 @@ int main( void ) // Enable vsync glfwSwapInterval( 1 ); - // Set window title - glfwSetWindowTitle( window, "Split view demo" ); - // Enable sticky keys glfwEnable( window, GLFW_STICKY_KEYS ); diff --git a/examples/triangle.c b/examples/triangle.c index 47a69bf0..3d717bc5 100644 --- a/examples/triangle.c +++ b/examples/triangle.c @@ -23,7 +23,7 @@ int main( void ) } // Open a window and create its OpenGL context - window = glfwOpenWindow( 640, 480, GLFW_WINDOWED ); + window = glfwOpenWindow( 640, 480, GLFW_WINDOWED, "Spinning Triangle" ); if (!window) { fprintf( stderr, "Failed to open GLFW window\n" ); @@ -32,8 +32,6 @@ int main( void ) exit( EXIT_FAILURE ); } - glfwSetWindowTitle( window, "Spinning Triangle" ); - // Ensure we can capture the escape key being pressed below glfwEnable( window, GLFW_STICKY_KEYS ); diff --git a/examples/wave.c b/examples/wave.c index a45afa2e..9cf82ba8 100644 --- a/examples/wave.c +++ b/examples/wave.c @@ -337,7 +337,7 @@ int main(int argc, char* argv[]) glfwOpenWindowHint(GLFW_DEPTH_BITS, 16); /* Open window */ - window = glfwOpenWindow(width,height,mode); + window = glfwOpenWindow(width, height, mode, "Wave Simulation"); if (!window) { fprintf(stderr, "Could not open window\n"); @@ -345,9 +345,6 @@ int main(int argc, char* argv[]) exit(-1); } - /* Set title */ - glfwSetWindowTitle( window, "Wave Simulation" ); - glfwSwapInterval( 1 ); /* Keyboard handler */ diff --git a/tests/accuracy.c b/tests/accuracy.c index 677aea20..d9ae6fa2 100644 --- a/tests/accuracy.c +++ b/tests/accuracy.c @@ -65,7 +65,7 @@ int main(void) exit(EXIT_FAILURE); } - window = glfwOpenWindow(window_width, window_height, GLFW_WINDOWED); + window = glfwOpenWindow(window_width, window_height, GLFW_WINDOWED, "Cursor Inaccuracy Detector"); if (!window) { glfwTerminate(); @@ -74,7 +74,6 @@ int main(void) exit(EXIT_FAILURE); } - glfwSetWindowTitle(window, "Cursor Inaccuracy Detector"); glfwSetMousePosCallback(window, mouse_position_callback); glfwSetWindowSizeCallback(window, window_size_callback); glfwSwapInterval(1); diff --git a/tests/defaults.c b/tests/defaults.c index 65eca894..fe0cff2c 100644 --- a/tests/defaults.c +++ b/tests/defaults.c @@ -75,7 +75,7 @@ int main(void) exit(1); } - window = glfwOpenWindow(0, 0, GLFW_WINDOWED); + window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Defaults"); if (!window) { glfwTerminate(); diff --git a/tests/events.c b/tests/events.c index ce44f018..f9d2fbe0 100644 --- a/tests/events.c +++ b/tests/events.c @@ -274,7 +274,7 @@ int main(void) printf("Library initialized\n"); - window = glfwOpenWindow(0, 0, GLFW_WINDOWED); + window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Event Linter"); if (!window) { glfwTerminate(); @@ -285,7 +285,6 @@ int main(void) printf("Window opened\n"); - glfwSetWindowTitle(window, "Event Linter"); glfwSwapInterval(1); glfwSetWindowSizeCallback(window, window_size_callback); diff --git a/tests/fsaa.c b/tests/fsaa.c index c80b42f1..c27316b5 100644 --- a/tests/fsaa.c +++ b/tests/fsaa.c @@ -56,7 +56,7 @@ int main(void) glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); - window = glfwOpenWindow(400, 400, GLFW_WINDOWED); + window = glfwOpenWindow(400, 400, GLFW_WINDOWED, "Aliasing Detector"); if (!window) { glfwTerminate(); @@ -65,7 +65,6 @@ int main(void) exit(EXIT_FAILURE); } - glfwSetWindowTitle(window, "Aliasing Detector"); glfwSetWindowSizeCallback(window, window_size_callback); glfwSwapInterval(1); diff --git a/tests/iconify.c b/tests/iconify.c index d82dd2f1..1773f059 100644 --- a/tests/iconify.c +++ b/tests/iconify.c @@ -109,7 +109,7 @@ int main(int argc, char** argv) height = 0; } - window = glfwOpenWindow(width, height, mode); + window = glfwOpenWindow(width, height, mode, "Iconify"); if (!window) { glfwTerminate(); @@ -118,7 +118,6 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } - glfwSetWindowTitle(window, "Iconify"); glfwSwapInterval(1); glfwSetKeyCallback(window, key_callback); glfwSetWindowSizeCallback(window, size_callback); diff --git a/tests/peter.c b/tests/peter.c index 277502f3..c22639ab 100644 --- a/tests/peter.c +++ b/tests/peter.c @@ -89,12 +89,10 @@ static GLboolean open_window(void) { int x, y; - window_handle = glfwOpenWindow(0, 0, GLFW_WINDOWED); + window_handle = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Peter Detector"); if (!window_handle) return GL_FALSE; - glfwSetWindowTitle(window_handle, "Peter Detector"); - glfwGetMousePos(window_handle, &x, &y); printf("Mouse position: %i %i\n", x, y); diff --git a/tests/reopen.c b/tests/reopen.c index 789b09e3..4239d3f9 100644 --- a/tests/reopen.c +++ b/tests/reopen.c @@ -84,14 +84,13 @@ static int open_window(int width, int height, int mode) { double base = glfwGetTime(); - window_handle = glfwOpenWindow(width, height, mode); + window_handle = glfwOpenWindow(width, height, mode, "Window Re-opener"); if (!window_handle) { fprintf(stderr, "Failed to open %s mode GLFW window: %s\n", get_mode_name(mode), glfwErrorString(glfwGetError())); return 0; } - glfwSetWindowTitle(window_handle, "Window Re-opener"); glfwSetWindowSizeCallback(window_handle, window_size_callback); glfwSetWindowCloseCallback(window_handle, window_close_callback); glfwSetKeyCallback(window_handle, key_callback); diff --git a/tests/tearing.c b/tests/tearing.c index 21278878..0f55acec 100644 --- a/tests/tearing.c +++ b/tests/tearing.c @@ -50,7 +50,7 @@ int main(void) exit(EXIT_FAILURE); } - window = glfwOpenWindow(0, 0, GLFW_WINDOWED); + window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Tearing Detector"); if (!window) { glfwTerminate(); @@ -59,7 +59,6 @@ int main(void) exit(EXIT_FAILURE); } - glfwSetWindowTitle(window, "Tearing Detector"); glfwSetWindowSizeCallback(window, window_size_callback); glfwSwapInterval(1); diff --git a/tests/version.c b/tests/version.c index c3f80a7e..42d67e34 100644 --- a/tests/version.c +++ b/tests/version.c @@ -183,7 +183,7 @@ int main(int argc, char** argv) // We assume here that we stand a better chance of success by leaving all // possible details of pixel format selection to GLFW - if (!glfwOpenWindow(0, 0, GLFW_WINDOWED)) + if (!glfwOpenWindow(0, 0, GLFW_WINDOWED, "Version")) { glfwTerminate(); diff --git a/tests/windows.c b/tests/windows.c index 8fee0741..99d48fba 100644 --- a/tests/windows.c +++ b/tests/windows.c @@ -40,20 +40,6 @@ static const char* titles[] = "Quux" }; -static GLFWwindow open_window(int width, int height, const char* title) -{ - GLFWwindow window = glfwOpenWindow(width, height, GLFW_WINDOWED); - if (!window) - { - fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError())); - return NULL; - } - - glfwSetWindowTitle(window, title); - - return window; -} - int main(void) { int i; @@ -62,16 +48,17 @@ int main(void) if (!glfwInit()) { - fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError())); + fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError())); exit(EXIT_FAILURE); } for (i = 0; i < 4; i++) { - windows[i] = open_window(200, 200, titles[i]); + windows[i] = glfwOpenWindow(200, 200, GLFW_WINDOWED, titles[i]); if (!windows[i]) { glfwTerminate(); + fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError())); exit(EXIT_FAILURE); }