From 73efcec564adc18d5618471ecb1a6e352787c510 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 27 Sep 2022 22:21:47 +0200 Subject: [PATCH] Examples: disable GL related warnings on Mac + amend to ignore list. --- .gitignore | 3 +++ backends/imgui_impl_glut.cpp | 1 + examples/example_glfw_opengl3/main.cpp | 1 + examples/example_glut_opengl2/main.cpp | 1 + examples/example_sdl_sdlrenderer/main.cpp | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 86bed609..44225c9a 100644 --- a/.gitignore +++ b/.gitignore @@ -45,9 +45,12 @@ examples/example_emscripten_wgpu/web/* cmake-build-* ## Unix executables from our example Makefiles +examples/example_glfw_metal/example_glfw_metal examples/example_glfw_opengl2/example_glfw_opengl2 examples/example_glfw_opengl3/example_glfw_opengl3 examples/example_glut_opengl2/example_glut_opengl2 examples/example_null/example_null +examples/example_sdl_metal/example_sdl_metal examples/example_sdl_opengl2/example_sdl_opengl2 examples/example_sdl_opengl3/example_sdl_opengl3 +examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer diff --git a/backends/imgui_impl_glut.cpp b/backends/imgui_impl_glut.cpp index 26b48318..7a9a32a6 100644 --- a/backends/imgui_impl_glut.cpp +++ b/backends/imgui_impl_glut.cpp @@ -31,6 +31,7 @@ #include "imgui.h" #include "imgui_impl_glut.h" +#define GL_SILENCE_DEPRECATION #ifdef __APPLE__ #include #else diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp index 93313415..222e27de 100644 --- a/examples/example_glfw_opengl3/main.cpp +++ b/examples/example_glfw_opengl3/main.cpp @@ -7,6 +7,7 @@ #include "imgui_impl_glfw.h" #include "imgui_impl_opengl3.h" #include +#define GL_SILENCE_DEPRECATION #if defined(IMGUI_IMPL_OPENGL_ES2) #include #endif diff --git a/examples/example_glut_opengl2/main.cpp b/examples/example_glut_opengl2/main.cpp index d9bd9040..81239cd6 100644 --- a/examples/example_glut_opengl2/main.cpp +++ b/examples/example_glut_opengl2/main.cpp @@ -17,6 +17,7 @@ #include "imgui.h" #include "imgui_impl_glut.h" #include "imgui_impl_opengl2.h" +#define GL_SILENCE_DEPRECATION #ifdef __APPLE__ #include #else diff --git a/examples/example_sdl_sdlrenderer/main.cpp b/examples/example_sdl_sdlrenderer/main.cpp index c48eecd4..736e7c6f 100644 --- a/examples/example_sdl_sdlrenderer/main.cpp +++ b/examples/example_sdl_sdlrenderer/main.cpp @@ -38,7 +38,7 @@ int main(int, char**) if (renderer == NULL) { SDL_Log("Error creating SDL_Renderer!"); - return false; + return 0; } //SDL_RendererInfo info; //SDL_GetRendererInfo(renderer, &info);