From 352bd8e7e0e657442e982d8b34c81731d43f1f24 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 26 Apr 2020 21:14:38 -0700 Subject: Completed Vulkan enabling on Android (closed https://github.com/DiligentGraphics/DiligentCore/issues/33) --- unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp | 6 +++--- unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp | 4 ++-- unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'unityplugin/UnityEmulator') diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp index 04c244f..b10cc22 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp @@ -41,9 +41,9 @@ public: UNEXPECTED("Present is not expected to be called directly"); } - virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight) override final + virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform) override final { - TBase::Resize(NewWidth, NewHeight, 0); + TBase::Resize(NewWidth, NewHeight, NewPreTransform, 0); } void ReleaseViews() @@ -150,7 +150,7 @@ void DiligentGraphicsAdapterD3D11::PostSwapChainResize() { auto* GraphicsD3D11Impl = m_UnityGraphicsD3D11.GetGraphicsImpl(); auto* pProxySwapChainD3D11 = m_pProxySwapChain.RawPtr(); - pProxySwapChainD3D11->Resize(GraphicsD3D11Impl->GetBackBufferWidth(), GraphicsD3D11Impl->GetBackBufferHeight()); + pProxySwapChainD3D11->Resize(GraphicsD3D11Impl->GetBackBufferWidth(), GraphicsD3D11Impl->GetBackBufferHeight(), SURFACE_TRANSFORM_OPTIMAL); pProxySwapChainD3D11->CreateViews(GraphicsD3D11Impl->GetRTV(), GraphicsD3D11Impl->GetDSV()); } diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp index 813c11f..e859af2 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D12.cpp @@ -125,9 +125,9 @@ public: UNEXPECTED("Windowed mode cannot be set through the proxy swap chain"); } - virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight) override final + virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform) override final { - TBase::Resize(NewWidth, NewHeight, 0); + TBase::Resize(NewWidth, NewHeight, NewPreTransform, 0); } void ReleaseBuffers() diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp index 56c314b..8553447 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp @@ -48,9 +48,9 @@ public: UNEXPECTED("Windowed mode cannot be set through the proxy swap chain"); } - virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight)override final + virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFORM NewPreTransform)override final { - if (TBase::Resize(NewWidth, NewHeight, 0)) + if (TBase::Resize(NewWidth, NewHeight, NewPreTransform)) { CreateDummyBuffers(); } @@ -145,7 +145,7 @@ void DiligentGraphicsAdapterGL::BeginFrame() auto *UnityGraphicsGLImpl = m_UnityGraphicsGL.GetGraphicsImpl(); Uint32 Width = UnityGraphicsGLImpl->GetBackBufferWidth(); Uint32 Height = UnityGraphicsGLImpl->GetBackBufferHeight(); - m_pProxySwapChain.RawPtr()->Resize(Width, Height); + m_pProxySwapChain.RawPtr()->Resize(Width, Height, SURFACE_TRANSFORM_OPTIMAL); } void DiligentGraphicsAdapterGL::EndFrame() -- cgit v1.2.3