From 7b186135859a5580ef8a9d14bb856521a4cbf467 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 4 Feb 2018 14:26:23 -0800 Subject: Fixed Android build --- Graphics/GraphicsEngineOpenGL/CMakeLists.txt | 4 ++-- Graphics/GraphicsEngineOpenGL/include/pch.h | 19 ++++--------------- .../GraphicsEngineOpenGL/src/GLContextAndroid.cpp | 4 ---- 3 files changed, 6 insertions(+), 21 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt index cf57137d..a024c899 100644 --- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt +++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt @@ -172,8 +172,8 @@ if(PLATFORM_WIN32) set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static opengl32.lib) elseif(PLATFORM_ANDROID) set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} GLESv3 EGL android) - target_compile_definitions(GraphicsEngineOpenGL-static PRIVATE BUILDING_DLL USE_GL3_STUB=0) - target_compile_definitions(GraphicsEngineOpenGL-shared PRIVATE BUILDING_DLL USE_GL3_STUB=0) + target_compile_definitions(GraphicsEngineOpenGL-static PRIVATE BUILDING_DLL) + target_compile_definitions(GraphicsEngineOpenGL-shared PRIVATE BUILDING_DLL) set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) # -fvisibility=hidden elseif(PLATFORM_LINUX) set(PRIVATE_DEPENDENCIES ${PRIVATE_DEPENDENCIES} glew-static) diff --git a/Graphics/GraphicsEngineOpenGL/include/pch.h b/Graphics/GraphicsEngineOpenGL/include/pch.h index 5755e391..01be6247 100644 --- a/Graphics/GraphicsEngineOpenGL/include/pch.h +++ b/Graphics/GraphicsEngineOpenGL/include/pch.h @@ -88,16 +88,10 @@ #elif defined(PLATFORM_ANDROID) -# ifndef USE_GL3_STUB -# define USE_GL3_STUB 0 -# endif -# if USE_GL3_STUB -# include "GLStubsAndroid.h" -# include -# else -# include -# include -# endif +# include +# include + // GLStubs must be included after GLFeatures! +# include "GLStubsAndroid.h" #elif defined(PLATFORM_IOS) @@ -111,11 +105,6 @@ #include "Errors.h" -#ifdef PLATFORM_ANDROID - // GLStubs must be included after GLFeatures! - #include "GLStubs.h" -#endif - #include "PlatformDefinitions.h" #include "RefCntAutoPtr.h" #include "DebugUtilities.h" diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp index 685e82cb..09ed4f9f 100644 --- a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp @@ -185,10 +185,6 @@ namespace Diligent const char* versionStr = (const char*)glGetString( GL_VERSION ); LOG_INFO_MESSAGE( "GL Version: ", versionStr, '\n' ); -#if USE_GL3_STUB - gl3stubInit(); -#endif - LoadGLFunctions(); // When GL_FRAMEBUFFER_SRGB is enabled, and if the destination image is in the sRGB colorspace -- cgit v1.2.3