From 1c18d653134e1eb7e3e039d8b055334dba25f2cf Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 12 Mar 2018 14:43:37 +0100 Subject: [PATCH] Examples: Renamed glfw error callback for clarity. --- examples/opengl2_example/main.cpp | 4 ++-- examples/opengl3_example/main.cpp | 4 ++-- examples/vulkan_example/main.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp index 37060688..6728347c 100644 --- a/examples/opengl2_example/main.cpp +++ b/examples/opengl2_example/main.cpp @@ -11,7 +11,7 @@ #include #include -static void error_callback(int error, const char* description) +static void glfw_error_callback(int error, const char* description) { fprintf(stderr, "Error %d: %s\n", error, description); } @@ -19,7 +19,7 @@ static void error_callback(int error, const char* description) int main(int, char**) { // Setup window - glfwSetErrorCallback(error_callback); + glfwSetErrorCallback(glfw_error_callback); if (!glfwInit()) return 1; GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui OpenGL2 example", NULL, NULL); diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 143dcc59..ce2f1156 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -9,7 +9,7 @@ #include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you. #include -static void error_callback(int error, const char* description) +static void glfw_error_callback(int error, const char* description) { fprintf(stderr, "Error %d: %s\n", error, description); } @@ -17,7 +17,7 @@ static void error_callback(int error, const char* description) int main(int, char**) { // Setup window - glfwSetErrorCallback(error_callback); + glfwSetErrorCallback(glfw_error_callback); if (!glfwInit()) return 1; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp index 1631c8df..79ceb8b2 100644 --- a/examples/vulkan_example/main.cpp +++ b/examples/vulkan_example/main.cpp @@ -583,7 +583,7 @@ static void frame_present() g_FrameIndex = (g_FrameIndex + 1) % IMGUI_VK_QUEUED_FRAMES; } -static void error_callback(int error, const char* description) +static void glfw_error_callback(int error, const char* description) { fprintf(stderr, "Error %d: %s\n", error, description); } @@ -591,7 +591,7 @@ static void error_callback(int error, const char* description) int main(int, char**) { // Setup window - glfwSetErrorCallback(error_callback); + glfwSetErrorCallback(glfw_error_callback); if (!glfwInit()) return 1;