diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-31 05:37:55 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-31 05:37:55 +0000 |
| commit | fd1ed1c23713de58b817ad2bbe2d027c9d1e04cb (patch) | |
| tree | fb3e6908266f9862c4db5cca846cd1d50eae4c0d /unityplugin/GhostCubePlugin/PluginSource | |
| parent | Merge pull request #71 from ahcox/ahc-001-build_instructions_ubuntu (diff) | |
| download | DiligentEngine-fd1ed1c23713de58b817ad2bbe2d027c9d1e04cb.tar.gz DiligentEngine-fd1ed1c23713de58b817ad2bbe2d027c9d1e04cb.zip | |
Implemented C API
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
6 files changed, 10 insertions, 10 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.cpp index a46d275..73badff 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.cpp @@ -1,7 +1,7 @@ #include "RenderAPI.h" #include "PlatformBase.h" #include "Unity/IUnityGraphics.h" -#include "GraphicsAccessories.h" +#include "GraphicsAccessories.hpp" using namespace Diligent; diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.h b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.h index 8d80f6e..0d6b25e 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.h +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI.h @@ -3,7 +3,7 @@ #include "Unity/IUnityGraphics.h" #include "RenderDevice.h" #include "DeviceContext.h" -#include "RefCntAutoPtr.h" +#include "RefCntAutoPtr.hpp" struct IUnityInterfaces; diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp index 3564939..b3f2fd2 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D11.cpp @@ -80,11 +80,11 @@ void RenderAPI_D3D11::AttachToNativeRenderTexture(void *nativeRenderTargetHandle auto *pd3d11RenderTarget = reinterpret_cast<ID3D11Texture2D *>(nativeRenderTargetHandle); RefCntAutoPtr<ITexture> pRenderTarget; - pDeviceD3D11->CreateTextureFromD3DResource(pd3d11RenderTarget, RESOURCE_STATE_UNDEFINED, &pRenderTarget); + pDeviceD3D11->CreateTexture2DFromD3DResource(pd3d11RenderTarget, RESOURCE_STATE_UNDEFINED, &pRenderTarget); auto *pd3d11DepthBuffer = reinterpret_cast<ID3D11Texture2D *>(nativeDepthTextureHandle); RefCntAutoPtr<ITexture> pDepthBuffer; - pDeviceD3D11->CreateTextureFromD3DResource(pd3d11DepthBuffer, RESOURCE_STATE_UNDEFINED, &pDepthBuffer); + pDeviceD3D11->CreateTexture2DFromD3DResource(pd3d11DepthBuffer, RESOURCE_STATE_UNDEFINED, &pDepthBuffer); CreateTextureViews(pRenderTarget, pDepthBuffer); } diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp index 05c76d9..edb3fc2 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_D3D12.cpp @@ -18,8 +18,8 @@ #include "RenderDeviceD3D12.h" #include "CommandQueueD3D12.h" #include "TextureD3D12.h" -#include "ObjectBase.h" -#include "DefaultRawMemoryAllocator.h" +#include "ObjectBase.hpp" +#include "DefaultRawMemoryAllocator.hpp" using namespace Diligent; diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp index 05321af..0b3e3c7 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp @@ -1,7 +1,7 @@ #include "SamplePlugin.h" #include "GraphicsUtilities.h" -#include "MapHelper.h" +#include "MapHelper.hpp" using namespace Diligent; @@ -51,7 +51,7 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T PSODesc.GraphicsPipeline.DSVFormat = DSVFormat; PSODesc.GraphicsPipeline.PrimitiveTopology = PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_BACK; - PSODesc.GraphicsPipeline.RasterizerDesc.FrontCounterClockwise = deviceType == DeviceType::D3D11 || deviceType == DeviceType::D3D12 ? true : false; + PSODesc.GraphicsPipeline.RasterizerDesc.FrontCounterClockwise = deviceType == RENDER_DEVICE_TYPE_D3D11 || deviceType == RENDER_DEVICE_TYPE_D3D12 ? true : false; PSODesc.GraphicsPipeline.DepthStencilDesc.DepthFunc = UseReverseZ ? COMPARISON_FUNC_GREATER_EQUAL : COMPARISON_FUNC_LESS_EQUAL; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = True; diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.h b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.h index 291149f..0becc7f 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.h +++ b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.h @@ -2,9 +2,9 @@ #include "RenderDevice.h" #include "DeviceContext.h" -#include "RefCntAutoPtr.h" +#include "RefCntAutoPtr.hpp" #include "RenderAPI.h" -#include "BasicMath.h" +#include "BasicMath.hpp" class SamplePlugin { |
