Add platform check

This commit is contained in:
Tanishq Dubey 2024-06-14 19:33:45 -04:00
parent 6cafeb0834
commit 5cf05f1419
2 changed files with 7 additions and 1 deletions

View File

@ -24,7 +24,7 @@ UNAME_S := $(shell uname -s)
LINUX_GL_LIBS = -lGL LINUX_GL_LIBS = -lGL
CXXFLAGS = -std=c++20 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends CXXFLAGS = -std=c++20 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
CXXFLAGS += -DIMGUI_DEFINE_MATH_OPERATORS -Ofast CXXFLAGS += -DIMGUI_DEFINE_MATH_OPERATORS -O3 -DGL_SILENCE_DEPRECATION
LIBS = -lexiv2 LIBS = -lexiv2
##--------------------------------------------------------------------- ##---------------------------------------------------------------------

View File

@ -77,8 +77,14 @@ using namespace gl;
#elif defined(IMGUI_IMPL_OPENGL_LOADER_EPOXY) #elif defined(IMGUI_IMPL_OPENGL_LOADER_EPOXY)
#include <epoxy/gl.h> #include <epoxy/gl.h>
#else #else
#if defined(__APPLE__)
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/gl3.h> #include <OpenGL/gl3.h>
#else
#include <SDL2/SDL_opengl.h>
#include <SDL2/SDL_opengles2.h>
#include <SDL2/SDL_opengles2_gl2.h>
#endif
#endif #endif
#endif #endif