Skip to content

Commit

Permalink
Fixed macOS builds in Defold 1.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Jan 31, 2024
1 parent fca0e4b commit 32bc917
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion imgui/src/gl3w/gl3w.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/

#if defined(DM_PLATFORM_WINDOWS) || defined(DM_PLATFORM_LINUX)
#if defined(DM_PLATFORM_WINDOWS) || defined(DM_PLATFORM_LINUX) || defined(DM_PLATFORM_OSX)

#include <GL/gl3w.h>
#include <stdlib.h>
Expand Down
22 changes: 15 additions & 7 deletions imgui/src/imgui/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@
#pragma once

#if defined(DM_PLATFORM_HTML5)
#define IMGUI_IMPL_OPENGL_ES2
#undef GL_ES_VERSION_2_0
#define IMGUI_IMPL_OPENGL_ES2
#undef GL_ES_VERSION_2_0

#elif defined(DM_PLATFORM_WINDOWS)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
#define IMGUI_IMPL_OPENGL_LOADER_GL3W

#elif defined(DM_PLATFORM_LINUX)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
#define IMGUI_IMPL_OPENGL_LOADER_GL3W

#elif defined(DM_PLATFORM_OSX)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W

#elif defined(DM_PLATFORM_ANDROID)
#define IMGUI_IMPL_OPENGL_ES2
#define IMGUI_IMPL_OPENGL_ES2

#elif defined(DM_PLATFORM_IOS)
// autodetect in imgui_impl_opengl3.h
// autodetect in imgui_impl_opengl3.h

#else
#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM "dummy_loader.h"
#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM "dummy_loader.h"
#endif


Expand Down

0 comments on commit 32bc917

Please sign in to comment.