Skip to content

Commit

Permalink
Fixed ios and html5 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Feb 1, 2024
1 parent 32bc917 commit 04ca531
Show file tree
Hide file tree
Showing 9 changed files with 9,326 additions and 4 deletions.
656 changes: 656 additions & 0 deletions imgui/include/GLES2/gl2.h

Large diffs are not rendered by default.

4,101 changes: 4,101 additions & 0 deletions imgui/include/GLES2/gl2ext.h

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions imgui/include/GLES2/gl2platform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef __gl2platform_h_
#define __gl2platform_h_

/*
** Copyright 2017-2020 The Khronos Group Inc.
** SPDX-License-Identifier: Apache-2.0
*/

/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* Please contribute modifications back to Khronos as pull requests on the
* public github repository:
* https://github.com/KhronosGroup/OpenGL-Registry
*/

#include <KHR/khrplatform.h>

#ifndef GL_APICALL
#define GL_APICALL KHRONOS_APICALL
#endif

#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
#endif

#endif /* __gl2platform_h_ */
1,192 changes: 1,192 additions & 0 deletions imgui/include/GLES3/gl3.h

Large diffs are not rendered by default.

1,507 changes: 1,507 additions & 0 deletions imgui/include/GLES3/gl31.h

Large diffs are not rendered by default.

1,808 changes: 1,808 additions & 0 deletions imgui/include/GLES3/gl32.h

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions imgui/include/GLES3/gl3platform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef __gl3platform_h_
#define __gl3platform_h_

/*
** Copyright 2017-2020 The Khronos Group Inc.
** SPDX-License-Identifier: Apache-2.0
*/

/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* Please contribute modifications back to Khronos as pull requests on the
* public github repository:
* https://github.com/KhronosGroup/OpenGL-Registry
*/

#include <KHR/khrplatform.h>

#ifndef GL_APICALL
#define GL_APICALL KHRONOS_APICALL
#endif

#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
#endif

#endif /* __gl3platform_h_ */
2 changes: 0 additions & 2 deletions imgui/include/dummy_loader.h

This file was deleted.

10 changes: 8 additions & 2 deletions imgui/src/imgui/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#if defined(DM_PLATFORM_HTML5)
#define IMGUI_IMPL_OPENGL_ES2
#undef GL_ES_VERSION_2_0
#include <GLES2/gl2.h>

#elif defined(DM_PLATFORM_WINDOWS)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
Expand All @@ -29,12 +30,17 @@

#elif defined(DM_PLATFORM_ANDROID)
#define IMGUI_IMPL_OPENGL_ES2
#include <GLES2/gl2.h>

#elif defined(DM_PLATFORM_IOS)
// autodetect in imgui_impl_opengl3.h
#define IMGUI_IMPL_OPENGL_ES2
#undef GL_ES_VERSION_2_0
#include <GLES2/gl2.h>

#else
#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM "dummy_loader.h"
#define IMGUI_IMPL_OPENGL_ES3
#include <GLES3/gl3.h>

#endif


Expand Down

0 comments on commit 04ca531

Please sign in to comment.