diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9c84eea1..de3bd000 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -145,6 +145,7 @@ Other Changes: - Examples: Win32: Added support for XInput games (if ImGuiConfigFlags_NavEnableGamepad is enabled). - Examples: Win32: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages. (#2264) - Examples: DirectX9: Explicitly disable fog (D3DRS_FOGENABLE) before drawing in case user state has it set. (#2288, #2230) +- Examples: OpenGL2: Added #define GL_SILENCE_DEPRECATION to cope with newer XCode warnings. - Examples: OpenGL3: Using GLSL 4.10 shaders for any GLSL version over 410 (e.g. 430, 450). (#2329) [@BrutPitt] diff --git a/examples/example_glfw_opengl2/main.cpp b/examples/example_glfw_opengl2/main.cpp index 4873b1f9..ff4ffdbf 100644 --- a/examples/example_glfw_opengl2/main.cpp +++ b/examples/example_glfw_opengl2/main.cpp @@ -10,6 +10,9 @@ #include "imgui_impl_glfw.h" #include "imgui_impl_opengl2.h" #include +#ifdef __APPLE__ +#define GL_SILENCE_DEPRECATION +#endif #include // [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers. diff --git a/examples/imgui_impl_metal.mm b/examples/imgui_impl_metal.mm index 246765a7..b466a4cc 100644 --- a/examples/imgui_impl_metal.mm +++ b/examples/imgui_impl_metal.mm @@ -404,8 +404,8 @@ void ImGui_ImplMetal_DestroyDeviceObjects() commandEncoder:(id)commandEncoder { // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) - int fb_width = (int)(drawData->DisplaySize.x * draw_data->FramebufferScale.x); - int fb_height = (int)(drawData->DisplaySize.y * draw_data->FramebufferScale.y); + int fb_width = (int)(drawData->DisplaySize.x * drawData->FramebufferScale.x); + int fb_height = (int)(drawData->DisplaySize.y * drawData->FramebufferScale.y); if (fb_width <= 0 || fb_height <= 0 || drawData->CmdListsCount == 0) return; @@ -452,8 +452,8 @@ void ImGui_ImplMetal_DestroyDeviceObjects() [commandEncoder setVertexBuffer:vertexBuffer.buffer offset:0 atIndex:0]; // Will project scissor/clipping rectangles into framebuffer space - ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports - ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2) + ImVec2 clip_off = drawData->DisplayPos; // (0,0) unless using multi-viewports + ImVec2 clip_scale = drawData->FramebufferScale; // (1,1) unless using retina display which are often (2,2) // Render command lists size_t vertexBufferOffset = 0; diff --git a/examples/imgui_impl_opengl2.cpp b/examples/imgui_impl_opengl2.cpp index 425d3bea..6b2d3137 100644 --- a/examples/imgui_impl_opengl2.cpp +++ b/examples/imgui_impl_opengl2.cpp @@ -46,6 +46,7 @@ #define WINGDIAPI __declspec(dllimport) // Some Windows OpenGL headers need this #endif #if defined(__APPLE__) +#define GL_SILENCE_DEPRECATION #include #else #include