浏览代码

Examples: OpenGL2: Added #define GL_SILENCE_DEPRECATION to cope with newer XCode warnings.

omar 6 年之前
父节点
当前提交
169e3981fd
共有 3 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      docs/CHANGELOG.txt
  2. 3 0
      examples/example_glfw_opengl2/main.cpp
  3. 1 0
      examples/imgui_impl_opengl2.cpp

+ 1 - 0
docs/CHANGELOG.txt

@@ -81,6 +81,7 @@ Other Changes:
 - Examples: Win32: Added support for XInput games (if ImGuiConfigFlags_NavEnableGamepad is enabled).
 - 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: 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: 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]
 - Examples: OpenGL3: Using GLSL 4.10 shaders for any GLSL version over 410 (e.g. 430, 450). (#2329) [@BrutPitt]
 
 
 
 

+ 3 - 0
examples/example_glfw_opengl2/main.cpp

@@ -10,6 +10,9 @@
 #include "imgui_impl_glfw.h"
 #include "imgui_impl_glfw.h"
 #include "imgui_impl_opengl2.h"
 #include "imgui_impl_opengl2.h"
 #include <stdio.h>
 #include <stdio.h>
+#ifdef __APPLE__
+#define GL_SILENCE_DEPRECATION
+#endif
 #include <GLFW/glfw3.h>
 #include <GLFW/glfw3.h>
 
 
 // [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers.
 // [Win32] Our example includes a copy of glfw3.lib pre-compiled with VS2010 to maximize ease of testing and compatibility with old VS compilers.

+ 1 - 0
examples/imgui_impl_opengl2.cpp

@@ -44,6 +44,7 @@
 #define WINGDIAPI __declspec(dllimport)     // Some Windows OpenGL headers need this
 #define WINGDIAPI __declspec(dllimport)     // Some Windows OpenGL headers need this
 #endif
 #endif
 #if defined(__APPLE__)
 #if defined(__APPLE__)
+#define GL_SILENCE_DEPRECATION
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #else
 #else
 #include <GL/gl.h>
 #include <GL/gl.h>