Skip to content

Commit 7b18613

Browse files
Fixed Android build
1 parent d34392b commit 7b18613

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

Graphics/GraphicsEngineOpenGL/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ if(PLATFORM_WIN32)
172172
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static opengl32.lib)
173173
elseif(PLATFORM_ANDROID)
174174
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} GLESv3 EGL android)
175-
target_compile_definitions(GraphicsEngineOpenGL-static PRIVATE BUILDING_DLL USE_GL3_STUB=0)
176-
target_compile_definitions(GraphicsEngineOpenGL-shared PRIVATE BUILDING_DLL USE_GL3_STUB=0)
175+
target_compile_definitions(GraphicsEngineOpenGL-static PRIVATE BUILDING_DLL)
176+
target_compile_definitions(GraphicsEngineOpenGL-shared PRIVATE BUILDING_DLL)
177177
set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) # -fvisibility=hidden
178178
elseif(PLATFORM_LINUX)
179179
set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static)

Graphics/GraphicsEngineOpenGL/include/pch.h

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,10 @@
8888

8989
#elif defined(PLATFORM_ANDROID)
9090

91-
# ifndef USE_GL3_STUB
92-
# define USE_GL3_STUB 0
93-
# endif
94-
# if USE_GL3_STUB
95-
# include "GLStubsAndroid.h"
96-
# include <GLES2/gl2platform.h>
97-
# else
98-
# include <GLES3/gl3.h>
99-
# include <GLES3/gl3ext.h>
100-
# endif
91+
# include <GLES3/gl3.h>
92+
# include <GLES3/gl3ext.h>
93+
// GLStubs must be included after GLFeatures!
94+
# include "GLStubsAndroid.h"
10195

10296
#elif defined(PLATFORM_IOS)
10397

@@ -111,11 +105,6 @@
111105

112106
#include "Errors.h"
113107

114-
#ifdef PLATFORM_ANDROID
115-
// GLStubs must be included after GLFeatures!
116-
#include "GLStubs.h"
117-
#endif
118-
119108
#include "PlatformDefinitions.h"
120109
#include "RefCntAutoPtr.h"
121110
#include "DebugUtilities.h"

Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ namespace Diligent
185185
const char* versionStr = (const char*)glGetString( GL_VERSION );
186186
LOG_INFO_MESSAGE( "GL Version: ", versionStr, '\n' );
187187

188-
#if USE_GL3_STUB
189-
gl3stubInit();
190-
#endif
191-
192188
LoadGLFunctions();
193189

194190
// When GL_FRAMEBUFFER_SRGB is enabled, and if the destination image is in the sRGB colorspace

0 commit comments

Comments
 (0)