From 8f90332eded5d74489b7034db58a8f92c5df7f86 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 28 Dec 2017 15:48:32 -0800 Subject: Removed legacy VS project and solution files, updated project dependencies. --- .../UWP.Shared/UnityEmulatorUWP.Shared.vcxitems | 32 ---- .../UnityEmulatorUWP.Shared.vcxitems.filters | 16 -- .../UnityEmulator/build/UWP/UnityEmulator.vcxproj | 200 --------------------- .../build/UWP/UnityEmulator.vcxproj.filters | 2 - .../build/Win32/UnityEmulator.vcxproj | 190 -------------------- .../build/Win32/UnityEmulator.vcxproj.filters | 16 -- .../Windows.Shared/UnityEmulator.Shared.vcxitems | 45 ----- .../UnityEmulator.Shared.vcxitems.filters | 81 --------- .../build/Windows.Shared/UnityEmulator.props | 40 ----- .../src/DiligentGraphicsAdapterD3D11.cpp | 4 +- .../src/DiligentGraphicsAdapterD3D12.cpp | 4 +- .../src/DiligentGraphicsAdapterGL.cpp | 6 +- .../UnityEmulator/src/UWP/UnityEmulatorAppMain.cpp | 1 + .../src/UnityGraphicsD3D12Emulator.cpp | 26 +-- .../UnityEmulator/src/UnityGraphicsD3D12Impl.h | 2 +- .../UnityEmulator/src/UnityGraphicsEmulator.cpp | 2 +- .../src/UnityGraphicsGLCoreES_Emulator.cpp | 2 +- .../UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp | 2 +- unityplugin/UnityEmulator/src/Windows/WinMain.cpp | 2 +- 19 files changed, 26 insertions(+), 647 deletions(-) delete mode 100644 unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems delete mode 100644 unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems.filters delete mode 100644 unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj delete mode 100644 unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj.filters delete mode 100644 unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj delete mode 100644 unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj.filters delete mode 100644 unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems delete mode 100644 unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems.filters delete mode 100644 unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.props (limited to 'unityplugin/UnityEmulator') diff --git a/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems b/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems deleted file mode 100644 index a0d4048..0000000 --- a/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems +++ /dev/null @@ -1,32 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {FBE96ADC-7C36-45B2-BE6D-F173413EB1C6} - AtmosphereSample - UnityEmulatorUWP.Shared - 2c11e612-847b-48ac-a5dd-fd953e773442 - - - - %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems.filters b/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems.filters deleted file mode 100644 index 6763a1b..0000000 --- a/unityplugin/UnityEmulator/build/UWP.Shared/UnityEmulatorUWP.Shared.vcxitems.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj b/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj deleted file mode 100644 index 074fade..0000000 --- a/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj +++ /dev/null @@ -1,200 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {17597734-2FBF-481F-99D4-3315B70FE3E2} - StaticLibrary - UnityEmulator - en-US - 14.0 - true - Windows Store - 10.0.10586.0 - 10.0.10240.0 - 10.0 - - - - StaticLibrary - true - v140 - - - StaticLibrary - true - v140 - - - StaticLibrary - true - v140 - - - StaticLibrary - false - true - v140 - - - StaticLibrary - false - true - v140 - - - StaticLibrary - false - true - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - false - - - false - - - false - - - false - - - - false - true - - - Console - false - false - - - - - false - true - - - Console - false - false - - - - - false - true - - - Console - false - false - - - - - false - true - - - Console - false - false - - - - - false - true - - - Console - false - false - - - - - false - true - - - Console - false - false - - - - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj.filters b/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj.filters deleted file mode 100644 index c31757e..0000000 --- a/unityplugin/UnityEmulator/build/UWP/UnityEmulator.vcxproj.filters +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj b/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj deleted file mode 100644 index 736d6d6..0000000 --- a/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj +++ /dev/null @@ -1,190 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F40021AC-6D7B-4828-81C4-2D04F946A88E} - UnityEmulator - 10.0.10240.0 - UnityEmulator - - - - StaticLibrary - true - v140 - Unicode - - - StaticLibrary - true - v140 - Unicode - - - StaticLibrary - false - v140 - true - Unicode - - - StaticLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - _WINDOWS;PLATFORM_WIN32;_DEBUG;%(PreprocessorDefinitions) - - - true - Windows - - - Copying D3DCompiler_47.dll to $(TargetDir)... - copy "$(VC_ExecutablePath_x86_x86)\D3Dcompiler_47.dll" "$(TargetDir)" - - - - - Level3 - Disabled - true - _WINDOWS;PLATFORM_WIN32;_DEBUG;%(PreprocessorDefinitions) - - - true - Windows - - - Copying D3DCompiler_47.dll to $(TargetDir)... - copy "$(VC_ExecutablePath_x64_x64)\D3Dcompiler_47.dll" "$(TargetDir)" - - - - - Level3 - MaxSpeed - true - true - true - _WINDOWS;PLATFORM_WIN32;NDEBUG;%(PreprocessorDefinitions) - - - true - true - true - Windows - - - Copying D3DCompiler_47.dll to $(TargetDir)... - copy "$(VC_ExecutablePath_x86_x86)\D3Dcompiler_47.dll" "$(TargetDir)" - - - - - Level3 - MaxSpeed - true - true - true - _WINDOWS;PLATFORM_WIN32;NDEBUG;%(PreprocessorDefinitions) - - - true - true - true - Windows - - - Copying D3DCompiler_47.dll to $(TargetDir)... - copy "$(VC_ExecutablePath_x64_x64)\D3Dcompiler_47.dll" "$(TargetDir)" - - - - - - - - {7380f7e6-315f-4b4e-92eb-e6aeee865298} - - - {664e6f0d-6784-4760-9565-d54f8eb1edf4} - - - {fe289cc7-15d6-4a76-b9cb-f61cab3192c9} - - - {fff8071a-db82-485b-adc3-f0b675296869} - - - {15e346d3-fde6-4b29-88b7-fca14dada501} - - - {052dd700-477c-4512-a7f4-b05ebef5c80e} - - - {8ada5f93-7a38-4ad8-b8f5-1ffd4d4f630c} - - - {58f32677-436b-412a-bbf8-2b1310d82cd8} - - - - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj.filters b/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj.filters deleted file mode 100644 index 1395a81..0000000 --- a/unityplugin/UnityEmulator/build/Win32/UnityEmulator.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {e9f1e7cd-5112-4fb6-854a-3ebfd5efa88b} - - - {f1774749-d1e5-4b2c-9f8d-df8ef690d4b5} - - - - - Windows\src - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems b/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems deleted file mode 100644 index 37e73bc..0000000 --- a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems +++ /dev/null @@ -1,45 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {ae83b976-c8ca-4621-9269-bf47c5789018} - AtmosphereSample - UnityEmulator.Shared - 2c11e612-847b-48ac-a5dd-fd953e773442 - - - - %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems.filters b/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems.filters deleted file mode 100644 index 4fb2f8d..0000000 --- a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.Shared.vcxitems.filters +++ /dev/null @@ -1,81 +0,0 @@ - - - - - {74468132-c052-44c1-9407-963d145244d1} - - - {58f43661-c9a6-48e2-bfaa-818a394b2c36} - - - - - include - - - include - - - include - - - include - - - include - - - src - - - src - - - include - - - include - - - include - - - include - - - src - - - include - - - include - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.props b/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.props deleted file mode 100644 index 915b946..0000000 --- a/unityplugin/UnityEmulator/build/Windows.Shared/UnityEmulator.props +++ /dev/null @@ -1,40 +0,0 @@ - - - - - ..\.. - $(ProjectRoot)\build\assets - $(ProjectRoot)\..\.. - $(EngineRoot)\diligentcore - $(EngineRoot)\diligenttools - - - $(ProjectRoot)\include;$(CoreRoot)\Graphics\GraphicsEngine\interface;$(CoreRoot)\Graphics\GraphicsEngine\include;$(CoreRoot)\Graphics\GraphicsEngineD3D11\interface;$(CoreRoot)\Graphics\GraphicsEngineD3D12\interface;$(CoreRoot)\Graphics\GraphicsEngineD3DBase\include;$(CoreRoot)\Graphics\GraphicsEngineOpenGL\interface;$(CoreRoot)\Graphics\HLSL2GLSLConverterLib\interface;$(CoreRoot)\Common\include;$(CoreRoot)\Common\interface;$(CoreRoot)\Platforms\interface;$(CoreRoot)\Graphics\GraphicsTools\include;$(ToolsRoot)\TextureLoader\interface;$(AssetsPath)\shaders;$(ProjectRoot)\..\GhostCubePlugin\PluginSource\src\Unity;$(ProjectRoot)\src;$(ProjectRoot)\src\UWP;$(CoreRoot)\External\glew\include\GL;$(IncludePath) - - - - - d3d11.lib;d3d12.lib;d3dcompiler.lib;opengl32.lib;dxgi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - NotUsing - - - - - $(ProjectRoot) - - - $(AssetsPath) - - - $(EngineRoot) - - - $(CoreRoot) - - - $(ToolsRoot) - - - \ No newline at end of file diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp index 4b02965..e196585 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp @@ -31,7 +31,7 @@ public: virtual IDXGISwapChain *GetDXGISwapChain()override final { - UNEXPECTED("DXGI swap chain cannot be requested through the proxy swap chain") + UNEXPECTED("DXGI swap chain cannot be requested through the proxy swap chain"); return nullptr; } @@ -41,7 +41,7 @@ public: virtual void Present()override final { - UNEXPECTED("Present is not expected to be called directly") + UNEXPECTED("Present is not expected to be called directly"); } virtual void Resize(Uint32 NewWidth, Uint32 NewHeight)override final diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp index 9aea25d..11b912e 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp @@ -89,7 +89,7 @@ public: virtual IDXGISwapChain *GetDXGISwapChain()override final { - UNEXPECTED("DXGI swap chain cannot be requested through the proxy swap chain") + UNEXPECTED("DXGI swap chain cannot be requested through the proxy swap chain"); return nullptr; } @@ -105,7 +105,7 @@ public: virtual void Present()override final { - UNEXPECTED("Present is not expected to be called directly") + UNEXPECTED("Present is not expected to be called directly"); } virtual void Resize(Uint32 NewWidth, Uint32 NewHeight)override final diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp index 4b5ecb1..b9ab052 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp @@ -27,7 +27,7 @@ public: virtual void Present()override final { - UNEXPECTED("Present is not expected to be called directly") + UNEXPECTED("Present is not expected to be called directly"); } virtual void Resize(Uint32 NewWidth, Uint32 NewHeight)override final @@ -55,7 +55,7 @@ DiligentGraphicsAdapterGL::DiligentGraphicsAdapterGL(const UnityGraphicsGLCoreES SCDesc.ColorBufferFormat = TEX_FORMAT_RGBA8_UNORM_SRGB; else { - UNEXPECTED("Unexpected back buffer format") + UNEXPECTED("Unexpected back buffer format"); } if (DepthBufferGLFormat == GL_DEPTH_COMPONENT32F) @@ -66,7 +66,7 @@ DiligentGraphicsAdapterGL::DiligentGraphicsAdapterGL(const UnityGraphicsGLCoreES SCDesc.DepthBufferFormat = TEX_FORMAT_D16_UNORM; else { - UNEXPECTED("Unexpected depth buffer format") + UNEXPECTED("Unexpected depth buffer format"); } SCDesc.Width = UnityGraphicsGLImpl->GetBackBufferWidth(); diff --git a/unityplugin/UnityEmulator/src/UWP/UnityEmulatorAppMain.cpp b/unityplugin/UnityEmulator/src/UWP/UnityEmulatorAppMain.cpp index ea19b7c..71a82c1 100644 --- a/unityplugin/UnityEmulator/src/UWP/UnityEmulatorAppMain.cpp +++ b/unityplugin/UnityEmulator/src/UWP/UnityEmulatorAppMain.cpp @@ -26,6 +26,7 @@ #include "DirectXHelper.h" #include "StringTools.h" #include "Errors.h" +#include "FileSystem.h" using namespace UnityEmulatorApp; using namespace Windows::Foundation; diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Emulator.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Emulator.cpp index 19d1f20..ce42b31 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Emulator.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Emulator.cpp @@ -61,7 +61,7 @@ void UnityGraphicsD3D12Impl::CreateDeviceAndCommandQueue() CComPtr factory; HRESULT hr = CreateDXGIFactory1(__uuidof(factory), reinterpret_cast(static_cast(&factory)) ); - if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to create DXGI factory") + if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to create DXGI factory"); CComPtr hardwareAdapter; GetHardwareAdapter(factory, &hardwareAdapter); @@ -69,14 +69,14 @@ void UnityGraphicsD3D12Impl::CreateDeviceAndCommandQueue() hr = D3D12CreateDevice(hardwareAdapter, D3D_FEATURE_LEVEL_11_0, __uuidof(m_D3D12Device), reinterpret_cast(static_cast(&m_D3D12Device)) ); if( FAILED(hr)) { - LOG_WARNING_MESSAGE("Failed to create hardware device. Attempting to create WARP device") + LOG_WARNING_MESSAGE("Failed to create hardware device. Attempting to create WARP device"); CComPtr warpAdapter; hr = factory->EnumWarpAdapter( __uuidof(warpAdapter), reinterpret_cast(static_cast(&warpAdapter)) ); - if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to enum warp adapter") + if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to enum warp adapter"); hr = D3D12CreateDevice( warpAdapter, D3D_FEATURE_LEVEL_11_0, __uuidof(m_D3D12Device), reinterpret_cast(static_cast(&m_D3D12Device)) ); - if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to crate warp device") + if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to crate warp device"); } #if _DEBUG @@ -129,7 +129,7 @@ void UnityGraphicsD3D12Impl::CreateDeviceAndCommandQueue() queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; hr = m_D3D12Device->CreateCommandQueue(&queueDesc, __uuidof(m_D3D12CmdQueue), reinterpret_cast(static_cast(&m_D3D12CmdQueue))); - if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to create command queue") + if(FAILED(hr)) LOG_ERROR_AND_THROW("Failed to create command queue"); hr = m_D3D12Device->SetName(L"Main Command Queue"); VERIFY_EXPR(SUCCEEDED(hr)); @@ -168,7 +168,7 @@ void UnityGraphicsD3D12Impl::CreateSwapChain(void* pNativeWndHandle, unsigned in CComPtr pSwapChain1; CComPtr factory; HRESULT hr = CreateDXGIFactory1(__uuidof(factory), reinterpret_cast(static_cast(&factory)) ); - if(FAILED(hr))LOG_ERROR_AND_THROW("Failed to create DXGI factory") + if(FAILED(hr))LOG_ERROR_AND_THROW("Failed to create DXGI factory"); #if defined( PLATFORM_WIN32 ) hr = factory->CreateSwapChainForHwnd(m_D3D12CmdQueue, hWnd, &swapChainDesc, nullptr, nullptr, &pSwapChain1); @@ -210,7 +210,7 @@ void UnityGraphicsD3D12Impl::InitBuffersAndViews() rtvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; rtvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; auto hr = m_D3D12Device->CreateDescriptorHeap(&rtvHeapDesc, IID_PPV_ARGS(&m_RTVDescriptorHeap)); - if (FAILED(hr))LOG_ERROR_AND_THROW("Failed to create RTV descriptor heap") + if (FAILED(hr))LOG_ERROR_AND_THROW("Failed to create RTV descriptor heap"); m_rtvDescriptorSize = m_D3D12Device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); } @@ -223,7 +223,7 @@ void UnityGraphicsD3D12Impl::InitBuffersAndViews() rtvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV; rtvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; auto hr = m_D3D12Device->CreateDescriptorHeap(&rtvHeapDesc, IID_PPV_ARGS(&m_DSVDescriptorHeap)); - if (FAILED(hr))LOG_ERROR_AND_THROW("Failed to create DSV descriptor heap") + if (FAILED(hr))LOG_ERROR_AND_THROW("Failed to create DSV descriptor heap"); } { @@ -233,7 +233,7 @@ void UnityGraphicsD3D12Impl::InitBuffersAndViews() for (UINT n = 0; n < m_BackBuffersCount; n++) { auto hr = m_SwapChain->GetBuffer(n, IID_PPV_ARGS(&m_RenderTargets[n])); - VERIFY_EXPR(SUCCEEDED(hr)) + VERIFY_EXPR(SUCCEEDED(hr)); D3D12_RENDER_TARGET_VIEW_DESC RTVDesc = {}; RTVDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; @@ -271,7 +271,7 @@ void UnityGraphicsD3D12Impl::InitBuffersAndViews() ClearValue.Format = Desc.Format; auto hr = m_D3D12Device->CreateCommittedResource( &HeapProps, D3D12_HEAP_FLAG_NONE, &Desc, D3D12_RESOURCE_STATE_DEPTH_WRITE, &ClearValue, __uuidof(m_DepthStencilBuffer), reinterpret_cast(static_cast(&m_DepthStencilBuffer)) ); - if(FAILED(hr))LOG_ERROR_AND_THROW("Failed to create depth-stencil buffer") + if(FAILED(hr))LOG_ERROR_AND_THROW("Failed to create depth-stencil buffer"); // Create depth-stencil view D3D12_CPU_DESCRIPTOR_HANDLE dsvHandle = m_DSVDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); @@ -314,7 +314,7 @@ void UnityGraphicsD3D12Impl::ResizeSwapChain( UINT NewWidth, UINT NewHeight ) m_SwapChain->GetDesc( &SCDes ); auto hr = m_SwapChain->ResizeBuffers(SCDes.BufferCount, NewWidth, NewHeight, SCDes.BufferDesc.Format, SCDes.Flags); if(FAILED(hr)) - LOG_ERROR_MESSAGE("Failed to resize swap chain") + LOG_ERROR_MESSAGE("Failed to resize swap chain"); m_FrameIndex = m_SwapChain->GetCurrentBackBufferIndex(); @@ -353,7 +353,7 @@ CComPtr UnityGraphicsD3D12Impl::GetCommandAllocator() if (!m_CmdAllocator) { auto hr = m_D3D12Device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(m_CmdAllocator), reinterpret_cast(&m_CmdAllocator)); - VERIFY(SUCCEEDED(hr), "Failed to create command allocator") + VERIFY(SUCCEEDED(hr), "Failed to create command allocator"); m_CmdAllocator->SetName(L"UnityGraphicsD3D12Impl: cmd list allocator"); } @@ -400,7 +400,7 @@ void UnityGraphicsD3D12Impl::TransitonResourceStates(int stateCount, UnityGraphi { if (stateCount >= 0) { - VERIFY(m_pStateTransitionHandler != nullptr, "State transition handler is not set") + VERIFY(m_pStateTransitionHandler != nullptr, "State transition handler is not set"); m_pStateTransitionHandler->TransitionResources(stateCount, states); } } diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Impl.h b/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Impl.h index df496c7..c969f0d 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Impl.h +++ b/unityplugin/UnityEmulator/src/UnityGraphicsD3D12Impl.h @@ -62,7 +62,7 @@ public: private: UINT m_BackBufferWidth, m_BackBufferHeight; - static const UINT m_BackBuffersCount = 3; + static constexpr UINT m_BackBuffersCount = 3; UINT m_FrameIndex = 0; CComPtr m_D3D12Device; diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsEmulator.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsEmulator.cpp index cb21cfb..2bfbb32 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsEmulator.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsEmulator.cpp @@ -45,7 +45,7 @@ void UnityGraphicsEmulator::InvokeDeviceEventCallback(UnityGfxDeviceEventType ev //static void Get UnityGraphicsEmulator::UnityGraphicsEmulator() { - VERIFY(m_Instance == nullptr, "Only single instance of UnityGraphicsEmulator must be initialized") + VERIFY(m_Instance == nullptr, "Only single instance of UnityGraphicsEmulator must be initialized"); m_Instance = this; static IUnityGraphics UnityGraphics; UnityGraphics.GetRenderer = GetUnityRenderer; diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp index 9f17ef1..0fceadc 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp @@ -86,7 +86,7 @@ void UnityGraphicsGLCoreES_Emulator::BeginFrame() glDepthRangef( 0, 1 ); auto err = glGetError(); if( err != GL_NO_ERROR) - LOG_ERROR_MESSAGE("GL Error: ", err) + LOG_ERROR_MESSAGE("GL Error: ", err); } void UnityGraphicsGLCoreES_Emulator::EndFrame() diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp index 59a3aa0..f73db1a 100644 --- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp +++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp @@ -188,7 +188,7 @@ void UnityGraphicsGLCore_Impl::InitGLContext(void *pNativeWndHandle, //Or better yet, use the GL3 way to get the version number glGetIntegerv( GL_MAJOR_VERSION, &MajorVersion ); glGetIntegerv( GL_MINOR_VERSION, &MinorVersion ); - LOG_INFO_MESSAGE("Initialized OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ")") + LOG_INFO_MESSAGE("Initialized OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ")"); if( glDebugMessageCallback ) { diff --git a/unityplugin/UnityEmulator/src/Windows/WinMain.cpp b/unityplugin/UnityEmulator/src/Windows/WinMain.cpp index c8085aa..dad27c4 100644 --- a/unityplugin/UnityEmulator/src/Windows/WinMain.cpp +++ b/unityplugin/UnityEmulator/src/Windows/WinMain.cpp @@ -150,7 +150,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) } else { - LOG_ERROR("Unknown device type. Only the following types are supported: D3D11, D3D12, GL") + LOG_ERROR("Unknown device type. Only the following types are supported: D3D11, D3D12, GL"); return -1; } } -- cgit v1.2.3