From 0e8ca0c8aacc92e98a2a8ee34c548cce629ea0c9 Mon Sep 17 00:00:00 2001
From: Tristan Walter <twalter@orn.mpg.de>
Date: Sun, 18 Oct 2020 02:57:19 +0200
Subject: [PATCH] different defines

---
 Application/src/commons/common/gui/GLImpl.cpp | 29 ++++++++++++-------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/Application/src/commons/common/gui/GLImpl.cpp b/Application/src/commons/common/gui/GLImpl.cpp
index ebbc21a..a5d55f0 100644
--- a/Application/src/commons/common/gui/GLImpl.cpp
+++ b/Application/src/commons/common/gui/GLImpl.cpp
@@ -4,16 +4,6 @@
 #include <imgui/imgui.h>
 #include <imgui/examples/imgui_impl_glfw.h>
 
-#ifndef GL_VERSION_3_2
-#define OPENGL3_CONDITION (false)
-#define GL_PIXEL_PACK_BUFFER 0
-#define GL_RG8 0
-#define GL_TEXTURE_SWIZZLE_RGBA 0
-#define GL_RG 0
-#else
-#define OPENGL3_CONDITION (!CMN_USE_OPENGL2 && ((GLVersion.major == 3 && GLVersion.minor >= 2) || (GLVersion.major > 3)))
-#endif
-
 #include <imgui/examples/imgui_impl_opengl2.h>
 using ImTextureID_t = ImGui_OpenGL2_TextureID;
 
@@ -30,6 +20,25 @@ using ImTextureID_t = ImGui_OpenGL2_TextureID;
 #include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
 #endif
 
+#ifndef GL_VERSION_3_2
+#define OPENGL3_CONDITION (false)
+#else
+#define OPENGL3_CONDITION (!CMN_USE_OPENGL2 && ((GLVersion.major == 3 && GLVersion.minor >= 2) || (GLVersion.major > 3)))
+#endif
+
+#ifndef GL_PIXEL_PACK_BUFFER
+#define GL_PIXEL_PACK_BUFFER 0
+#endif
+#ifndef GL_RG
+#define GL_RG 0
+#endif
+#ifndef GL_RG8
+#define GL_RG8 0
+#endif
+#ifndef GL_TEXTURE_SWIZZLE_RGBA
+#define GL_TEXTURE_SWIZZLE_RGBA 0
+#endif
+
 //#define GLFW_INCLUDE_GL3  /* don't drag in legacy GL headers. */
 #define GLFW_NO_GLU       /* don't drag in the old GLU lib - unless you must. */
 
-- 
GitLab