mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Merge branch 'master' into multi-monitor
Conflicts: src/cocoa_window.m src/init.c tests/iconify.c tests/reopen.c
This commit is contained in:
+7
-7
@@ -38,6 +38,11 @@
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
static void error_callback(int error, const char* description)
|
||||
{
|
||||
fprintf(stderr, "Error: %s\n", description);
|
||||
}
|
||||
|
||||
static void window_size_callback(GLFWwindow window, int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
@@ -82,11 +87,10 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
glfwSetErrorCallback(error_callback);
|
||||
|
||||
if (!glfwInit())
|
||||
{
|
||||
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (samples)
|
||||
printf("Requesting FSAA with %i samples\n", samples);
|
||||
@@ -99,8 +103,6 @@ int main(int argc, char** argv)
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
|
||||
fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError()));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -113,8 +115,6 @@ int main(int argc, char** argv)
|
||||
if (!glfwExtensionSupported("GL_ARB_multisample"))
|
||||
{
|
||||
glfwTerminate();
|
||||
|
||||
fprintf(stderr, "Context reports GL_ARB_multisample is not supported\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user