From 0b9541f681f248762388be82149689df35fa632c Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 30 Jan 2020 18:53:37 -0800 Subject: Fixed Android build problems --- Graphics/GraphicsEngineOpenGL/CMakeLists.txt | 2 +- .../GraphicsEngineOpenGL/include/GLStubsAndroid.h | 2 +- .../include/RenderDeviceGLESImpl.h | 49 ---------------------- .../include/RenderDeviceGLESImpl.hpp | 49 ++++++++++++++++++++++ .../src/EngineFactoryOpenGL.cpp | 3 +- .../src/RenderDeviceGLESImpl.cpp | 2 +- 6 files changed, 54 insertions(+), 53 deletions(-) delete mode 100644 Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h create mode 100644 Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.hpp (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt index bb43533f..d118a30c 100644 --- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt +++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt @@ -100,7 +100,7 @@ elseif(PLATFORM_ANDROID) list(APPEND INCLUDE include/GLContextAndroid.hpp) list(APPEND INCLUDE include/GLStubsAndroid.h) - list(APPEND INCLUDE include/RenderDeviceGLESImpl.h) + list(APPEND INCLUDE include/RenderDeviceGLESImpl.hpp) list(APPEND INCLUDE include/SwapChainGLImpl.hpp) list(APPEND INTERFACE interface/RenderDeviceGLES.h) diff --git a/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h b/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h index 2a09d40c..d90ecfd1 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h +++ b/Graphics/GraphicsEngineOpenGL/include/GLStubsAndroid.h @@ -23,7 +23,7 @@ #pragma once -#include "Errors.h" +#include "Errors.hpp" // clang-format off diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h deleted file mode 100644 index 7971b979..00000000 --- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2015-2018 Egor Yusov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. - * - * In no event and under no legal theory, whether in tort (including negligence), - * contract, or otherwise, unless required by applicable law (such as deliberate - * and grossly negligent acts) or agreed to in writing, shall any Contributor be - * liable for any damages, including any direct, indirect, special, incidental, - * or consequential damages of any character arising as a result of this License or - * out of the use or inability to use the software (including but not limited to damages - * for loss of goodwill, work stoppage, computer failure or malfunction, or any and - * all other commercial damages or losses), even if such Contributor has been advised - * of the possibility of such damages. - */ - -#pragma once - -#include "RenderDeviceGLImpl.h" - -namespace Diligent -{ - -class RenderDeviceGLESImpl final : public RenderDeviceGLImpl -{ -public: - RenderDeviceGLESImpl(IReferenceCounters* pRefCounters, - IMemoryAllocator& RawMemAllocator, - IEngineFactory* pEngineFactory, - const EngineGLCreateInfo& InitAttribs, - const SwapChainDesc* pSCDesc = nullptr); - - virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface); - - virtual bool Invalidate(); - - virtual void Suspend(); - - virtual EGLint Resume(ANativeWindow* window); -}; - -} // namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.hpp new file mode 100644 index 00000000..fc0aa57f --- /dev/null +++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.hpp @@ -0,0 +1,49 @@ +/* Copyright 2015-2018 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#pragma once + +#include "RenderDeviceGLImpl.hpp" + +namespace Diligent +{ + +class RenderDeviceGLESImpl final : public RenderDeviceGLImpl +{ +public: + RenderDeviceGLESImpl(IReferenceCounters* pRefCounters, + IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, + const EngineGLCreateInfo& InitAttribs, + const SwapChainDesc* pSCDesc = nullptr); + + virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface); + + virtual bool Invalidate(); + + virtual void Suspend(); + + virtual EGLint Resume(ANativeWindow* window); +}; + +} // namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index 5faf3f47..7566a6ce 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -43,8 +43,9 @@ #endif #if PLATFORM_ANDROID -# include "RenderDeviceGLESImpl.h" +# include "RenderDeviceGLESImpl.hpp" # include "FileStream.h" +# include "FileSystem.hpp" #endif namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp index e18d4201..10a0033a 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp @@ -23,7 +23,7 @@ #include "pch.h" -#include "RenderDeviceGLESImpl.h" +#include "RenderDeviceGLESImpl.hpp" namespace Diligent { -- cgit v1.2.3