diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-03-04 20:35:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-03-04 20:35:31 +0000 |
| commit | 4ce52374ba2cecc80669db630dfea6cf34f76965 (patch) | |
| tree | 5d5dfebbbca0f2a5df5f5c057f30d478be9d5921 | |
| parent | Updated cmake files to handle the case when D3D12 is not supported on Win32 (diff) | |
| download | DiligentEngine-4ce52374ba2cecc80669db630dfea6cf34f76965.tar.gz DiligentEngine-4ce52374ba2cecc80669db630dfea6cf34f76965.zip | |
Enabled build with Win8.1 SDK
Replaced OPENGL_SUPPORTED macro with GL_SUPPORTED and GLES_SUPPORTED
| m--------- | DiligentCore | 0 | ||||
| m--------- | DiligentSamples | 0 | ||||
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 10 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestBufferCreation.cpp | 4 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestTextureCreation.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/GhostCubePlugin/PluginSource/src/PlatformBase.h | 8 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/CMakeLists.txt | 38 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/include/DiligentGraphicsAdapterGL.h | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/include/UnityGraphicsGLCoreES_Emulator.h | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/UnityAppBase.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h | 4 |
15 files changed, 53 insertions, 46 deletions
diff --git a/DiligentCore b/DiligentCore -Subproject c34e685db2df436f4e740eba89bb8876f2e2cb5 +Subproject ca84b5ff2628889e143f51a54a9604e57e5d008 diff --git a/DiligentSamples b/DiligentSamples -Subproject d6059010f58d70c743105b62e5d69c2d0c68c2e +Subproject a27854742a566847f18e154c2aea954357860d6 @@ -100,6 +100,10 @@ navigate to the engine's root folder and run the following command: *cmake -H. -B./cmk_build/Win64 -G "Visual Studio 15 2017 Win64"* +You can generate Win32 solution that targets Win8.1 SDK using the following command: + +*cmake -D CMAKE_SYSTEM_VERSION=8.1 -H. -B./cmk_build/Win64 -G "Visual Studio 15 2017 Win64"* + **WARNING!** In current implementation, full path to cmake build folder **must not contain white spaces**. (If anybody knows a way to add quotes to CMake's custom commands, please let me know!) @@ -125,6 +129,9 @@ from the engine's root folder: Set the desired project as startup project (by default, Atmosphere sample will be selected) and run it. +Note: you can generate solution that targets Windows 8.1 by defining CMAKE_SYSTEM_VERSION=8.1 cmake variable, but the solution will fail +to build as it will use Visual Studio 2013 (v120) toolset that lacks proper c++11 support. + ## Linux Your Linux environment needs to be set up for c++ development. To configure my fresh Ubuntu 17.10, I installed the following packages: diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index 49609c2..2e5509e 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -37,7 +37,7 @@ # include "RenderDeviceFactoryD3D12.h" #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED # include "RenderDeviceFactoryOpenGL.h" #endif @@ -51,8 +51,8 @@ #include "TestRasterizerState.h" #include "TestBlendState.h" #include "TestVPAndSR.h" -#if OPENGL_SUPPORTED -#include "ShaderConverterTest.h" +#if GL_SUPPORTED || GLES_SUPPORTED + #include "ShaderConverterTest.h" #endif #include "TestCopyTexData.h" #include "PlatformMisc.h" @@ -127,7 +127,7 @@ void TestApp::InitializeDiligentEngine( break; #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED case DeviceType::OpenGL: case DeviceType::OpenGLES: { @@ -184,7 +184,7 @@ void TestApp::InitializeRenderers() m_pTestShaderResArrays.reset(new TestShaderResArrays(m_pDevice, m_pImmediateContext, bUseOpenGL, 0.4f, -0.9f, 0.5f, 0.5f)); m_pMTResCreationTest.reset(new MTResourceCreationTest(m_pDevice, m_pImmediateContext, 7)); -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED ShaderConverterTest ConverterTest(m_pDevice, m_pImmediateContext); #endif TestSamplerCreation TestSamplers(m_pDevice); diff --git a/Tests/TestApp/src/TestBufferCreation.cpp b/Tests/TestApp/src/TestBufferCreation.cpp index 872f4bd..f0f5b3d 100644 --- a/Tests/TestApp/src/TestBufferCreation.cpp +++ b/Tests/TestApp/src/TestBufferCreation.cpp @@ -32,7 +32,7 @@ #include "TestCreateObjFromNativeResD3D12.h" #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include "TestCreateObjFromNativeResGL.h" #endif @@ -58,7 +58,7 @@ TestBufferCreation::TestBufferCreation(Diligent::IRenderDevice *pDevice, Diligen break; #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED case DeviceType::OpenGL: case DeviceType::OpenGLES: pTestCreateObjFromNativeRes.reset(new TestCreateObjFromNativeResGL(pDevice)); diff --git a/Tests/TestApp/src/TestTextureCreation.cpp b/Tests/TestApp/src/TestTextureCreation.cpp index bb95e15..acaccaa 100644 --- a/Tests/TestApp/src/TestTextureCreation.cpp +++ b/Tests/TestApp/src/TestTextureCreation.cpp @@ -36,7 +36,7 @@ #include "TestCreateObjFromNativeResD3D12.h" #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include "TestCreateObjFromNativeResGL.h" #endif @@ -68,7 +68,7 @@ public: break; #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED case DeviceType::OpenGL: case DeviceType::OpenGLES: m_pTestCreateObjFromNativeRes.reset(new TestCreateObjFromNativeResGL(pDevice)); diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/PlatformBase.h b/unityplugin/GhostCubePlugin/PluginSource/src/PlatformBase.h index b691136..fc407b0 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/PlatformBase.h +++ b/unityplugin/GhostCubePlugin/PluginSource/src/PlatformBase.h @@ -34,13 +34,13 @@ // Which graphics device APIs we possibly support? #if UNITY_METRO - #define SUPPORT_D3D11 1 + #define SUPPORT_D3D11 D3D11_SUPPORTED #if WINDOWS_UWP - #define SUPPORT_D3D12 1 + #define SUPPORT_D3D12 D3D12_SUPPORTED #endif #elif UNITY_WIN - #define SUPPORT_D3D11 1 - #define SUPPORT_D3D12 1 + #define SUPPORT_D3D11 D3D11_SUPPORTED + #define SUPPORT_D3D12 D3D12_SUPPORTED #define SUPPORT_OPENGL_UNIFIED 1 #define SUPPORT_OPENGL_CORE 1 #elif UNITY_IPHONE || UNITY_ANDROID || UNITY_WEBGL diff --git a/unityplugin/UnityEmulator/CMakeLists.txt b/unityplugin/UnityEmulator/CMakeLists.txt index f66db7f..3e1d940 100644 --- a/unityplugin/UnityEmulator/CMakeLists.txt +++ b/unityplugin/UnityEmulator/CMakeLists.txt @@ -43,15 +43,15 @@ if(GL_SUPPORTED) list(APPEND INCLUDE src/UnityGraphicsGLCore_Impl.h)
endif()
-if(GLES_SUPPORTED) +if(GLES_SUPPORTED)
if(PLATFORM_ANDROID)
list(APPEND SOURCE src/Android/UnityGraphicsGLESAndroid_Impl.cpp)
- list(APPEND INCLUDE src/Android/UnityGraphicsGLESAndroid_Impl.h) - elseif(PLATFORM_IOS) + list(APPEND INCLUDE src/Android/UnityGraphicsGLESAndroid_Impl.h)
+ elseif(PLATFORM_IOS)
list(APPEND SOURCE src/IOS/UnityGraphicsGLES_IOS_Impl.mm)
- list(APPEND INCLUDE src/IOS/UnityGraphicsGLES_IOS_Impl.h) - else() - message(FATAL_ERROR Unknown platform) + list(APPEND INCLUDE src/IOS/UnityGraphicsGLES_IOS_Impl.h)
+ else()
+ message(FATAL_ERROR Unknown platform)
endif()
endif()
@@ -105,12 +105,12 @@ elseif(PLATFORM_MACOS) )
elseif(PLATFORM_IOS)
- list(APPEND SOURCE - src/IOS/UnityAppIOS.cpp - src/UnityAppBase.cpp - ) - list(APPEND INCLUDE - include/UnityAppBase.h + list(APPEND SOURCE
+ src/IOS/UnityAppIOS.cpp
+ src/UnityAppBase.cpp
+ )
+ list(APPEND INCLUDE
+ include/UnityAppBase.h
)
else()
message(FATAL_ERROR "Unknown platform")
@@ -170,13 +170,13 @@ elseif(PLATFORM_MACOS) src/MacOS
)
endif()
- -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - # Disable the following clang warning - # '<function name>' hides overloaded virtual function - # as hiding is intended - target_compile_options(UnityEmulator PRIVATE -Wno-overloaded-virtual) -endif() +
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # Disable the following clang warning
+ # '<function name>' hides overloaded virtual function
+ # as hiding is intended
+ target_compile_options(UnityEmulator PRIVATE -Wno-overloaded-virtual)
+endif()
source_group("src" FILES ${SOURCE})
source_group("include" FILES ${INCLUDE})
diff --git a/unityplugin/UnityEmulator/include/DiligentGraphicsAdapterGL.h b/unityplugin/UnityEmulator/include/DiligentGraphicsAdapterGL.h index 835015d..a16d5f0 100644 --- a/unityplugin/UnityEmulator/include/DiligentGraphicsAdapterGL.h +++ b/unityplugin/UnityEmulator/include/DiligentGraphicsAdapterGL.h @@ -24,7 +24,7 @@ #include "PlatformDefinitions.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include "DiligentGraphicsAdapter.h" @@ -43,4 +43,4 @@ private: const UnityGraphicsGLCoreES_Emulator& m_UnityGraphicsGL; }; -#endif // OPENGL_SUPPORTED
\ No newline at end of file +#endif // GL_SUPPORTED || GLES_SUPPORTED
\ No newline at end of file diff --git a/unityplugin/UnityEmulator/include/UnityGraphicsGLCoreES_Emulator.h b/unityplugin/UnityEmulator/include/UnityGraphicsGLCoreES_Emulator.h index 4b14a73..53f372d 100644 --- a/unityplugin/UnityEmulator/include/UnityGraphicsGLCoreES_Emulator.h +++ b/unityplugin/UnityEmulator/include/UnityGraphicsGLCoreES_Emulator.h @@ -2,7 +2,7 @@ #include "PlatformDefinitions.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include <memory> #include "UnityGraphicsEmulator.h" @@ -47,4 +47,4 @@ private: static std::unique_ptr<UnityGraphicsGL_Impl> m_GraphicsImpl; }; -#endif // OPENGL_SUPPORTED +#endif // GL_SUPPORTED || GLES_SUPPORTED diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp index 3779bca..1d7ac11 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp @@ -1,6 +1,6 @@ #include "DiligentGraphicsAdapterGL.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include "UnityGraphicsGLCoreES_Emulator.h" #include "RenderDeviceFactoryOpenGL.h" @@ -112,4 +112,4 @@ bool DiligentGraphicsAdapterGL::UsesReverseZ() return m_UnityGraphicsGL.UsesReverseZ(); } -#endif // OPENGL_SUPPORTED +#endif // GL_SUPPORTED || GLES_SUPPORTED diff --git a/unityplugin/UnityEmulator/src/UnityAppBase.cpp b/unityplugin/UnityEmulator/src/UnityAppBase.cpp index 14a8cfc..5a037fb 100644 --- a/unityplugin/UnityEmulator/src/UnityAppBase.cpp +++ b/unityplugin/UnityEmulator/src/UnityAppBase.cpp @@ -34,7 +34,7 @@ # include "DiligentGraphicsAdapterD3D12.h" #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED # include "UnityGraphicsGLCoreES_Emulator.h" # include "DiligentGraphicsAdapterGL.h" #endif @@ -147,7 +147,7 @@ void UnityAppBase::InitGraphics( break; #endif -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED case DeviceType::OpenGL: case DeviceType::OpenGLES: { diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp index 19744b0..2c8e052 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp @@ -2,7 +2,7 @@ #include "UnityGraphicsGLCoreES_Emulator.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED || GLES_SUPPORTED #include "DebugUtilities.h" #include "Errors.h" @@ -102,4 +102,4 @@ void UnityGraphicsGLCoreES_Emulator::EndFrame() { } -#endif // OPENGL_SUPPORTED +#endif // GL_SUPPORTED || GLES_SUPPORTED diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp index 03b84ba..4342ec9 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp @@ -1,7 +1,7 @@ #include "UnityGraphicsGLCore_Impl.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED #include <iostream> #include "DebugUtilities.h" @@ -251,4 +251,4 @@ void UnityGraphicsGLCore_Impl::SwapBuffers() #endif } -#endif // OPENGL_SUPPORTED +#endif // GL_SUPPORTED diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h index f6d42ea..97c47b6 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h +++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h @@ -2,7 +2,7 @@ #include "PlatformDefinitions.h" -#if OPENGL_SUPPORTED +#if GL_SUPPORTED #if PLATFORM_WIN32 @@ -110,4 +110,4 @@ private: NativeGLContextType m_Context; }; -#endif //OPENGL_SUPPORTED +#endif // GL_SUPPORTED |
