From 44f94f4b3003df3db242d52592019dea6e3bcbfb Mon Sep 17 00:00:00 2001 From: Egor Date: Fri, 10 May 2019 18:39:15 -0700 Subject: Reworked Android Platform to not depend on NDKHelper & native_app_glue Removed native_app_glue from core Added IEngineFactory::InitAndroidFileSystem android-only function --- .../GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h | 2 +- Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h index a3908362..13eee3a1 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h @@ -65,7 +65,7 @@ public: const SwapChainDesc& SCDesc, ISwapChain** ppSwapChain ) = 0; virtual void CreateHLSL2GLSLConverter(IHLSL2GLSLConverter** ppConverter) = 0; - + virtual void AttachToActiveGLContext(const EngineGLCreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppImmediateContext) = 0; diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index 1e0c470f..e1318650 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -40,6 +40,7 @@ #if PLATFORM_ANDROID # include "RenderDeviceGLESImpl.h" +# include "FileStream.h" #endif namespace Diligent @@ -85,6 +86,10 @@ public: virtual void AttachToActiveGLContext(const EngineGLCreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppImmediateContext )override final; + +#if PLATFORM_ANDROID + virtual void InitAndroidFileSystem(void* Activity, const char* ActivityClassName) const override final; +#endif }; @@ -251,6 +256,14 @@ void EngineFactoryOpenGLImpl::CreateHLSL2GLSLConverter(IHLSL2GLSLConverter** ppC pConverter->QueryInterface( IID_HLSL2GLSLConverter, reinterpret_cast(ppConverter) ); } +#if PLATFORM_ANDROID +void EngineFactoryOpenGLImpl::InitAndroidFileSystem(void* Activity, const char* ActivityClassName) const +{ + AndroidFileSystem::Init(Activity, ActivityClassName); +} +#endif + + API_QUALIFIER Diligent::IEngineFactoryOpenGL* GetEngineFactoryOpenGL() { -- cgit v1.2.3