diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-28 03:02:49 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-28 03:02:49 +0000 |
| commit | 461ceb7feac0317aed4f19a6fc5f35efd561c808 (patch) | |
| tree | 2398902f0c0a8676621948a70ac62c79abe4558f /Tests/IncludeTest | |
| parent | Fixed class vs struct issues. Implemented HLSL2GLSL Convertor C interfaces (diff) | |
| download | DiligentCore-461ceb7feac0317aed4f19a6fc5f35efd561c808.tar.gz DiligentCore-461ceb7feac0317aed4f19a6fc5f35efd561c808.zip | |
Refactored D3D11 C interface
Diffstat (limited to 'Tests/IncludeTest')
3 files changed, 37 insertions, 2 deletions
diff --git a/Tests/IncludeTest/GraphicsEngineD3D11/RenderDeviceD3D11H_test.c b/Tests/IncludeTest/GraphicsEngineD3D11/RenderDeviceD3D11H_test.c index cb81b366..aa4c476f 100644 --- a/Tests/IncludeTest/GraphicsEngineD3D11/RenderDeviceD3D11H_test.c +++ b/Tests/IncludeTest/GraphicsEngineD3D11/RenderDeviceD3D11H_test.c @@ -27,3 +27,26 @@ #include <d3d11.h> #include "DiligentCore/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h" + +void TestRenderDeviceD3D11CInterface(IRenderDeviceD3D11* pDevice) +{ + ID3D11Device* pd3d11Device = IRenderDeviceD3D11_GetD3D11Device(pDevice); + (void)pd3d11Device; + + ID3D11Buffer* pd3d11Buffer = NULL; + IBuffer* pBuff = NULL; + BufferDesc BuffDesc = {0}; + IRenderDeviceD3D11_CreateBufferFromD3DResource(pDevice, pd3d11Buffer, &BuffDesc, RESOURCE_STATE_CONSTANT_BUFFER, &pBuff); + + ID3D11Texture1D* pd3d11Texture1D = NULL; + ITexture* pTex1D = NULL; + IRenderDeviceD3D11_CreateTexture1DFromD3DResource(pDevice, pd3d11Texture1D, RESOURCE_STATE_SHADER_RESOURCE, &pTex1D); + + ID3D11Texture2D* pd3d11Texture2D = NULL; + ITexture* pTex2D = NULL; + IRenderDeviceD3D11_CreateTexture2DFromD3DResource(pDevice, pd3d11Texture2D, RESOURCE_STATE_SHADER_RESOURCE, &pTex2D); + + ID3D11Texture3D* pd3d11Texture3D = NULL; + ITexture* pTex3D = NULL; + IRenderDeviceD3D11_CreateTexture3DFromD3DResource(pDevice, pd3d11Texture3D, RESOURCE_STATE_SHADER_RESOURCE, &pTex3D); +} diff --git a/Tests/IncludeTest/GraphicsEngineD3D11/SamplerD3D11H_test.c b/Tests/IncludeTest/GraphicsEngineD3D11/SamplerD3D11H_test.c index 1d2a72d9..e81f7852 100644 --- a/Tests/IncludeTest/GraphicsEngineD3D11/SamplerD3D11H_test.c +++ b/Tests/IncludeTest/GraphicsEngineD3D11/SamplerD3D11H_test.c @@ -30,6 +30,6 @@ void TestSamplerD3D11_CInterface(struct ISamplerD3D11* pSampler) { - ID3D11SamplerState* pd3d11Sampler = ISamplerD3D11_GetD3D11Sampler(pSampler); + ID3D11SamplerState* pd3d11Sampler = ISamplerD3D11_GetD3D11SamplerState(pSampler); (void)pd3d11Sampler; } diff --git a/Tests/IncludeTest/GraphicsEngineD3D11/SwapChainD3D11H_test.c b/Tests/IncludeTest/GraphicsEngineD3D11/SwapChainD3D11H_test.c index 5364e032..068d25cf 100644 --- a/Tests/IncludeTest/GraphicsEngineD3D11/SwapChainD3D11H_test.c +++ b/Tests/IncludeTest/GraphicsEngineD3D11/SwapChainD3D11H_test.c @@ -25,4 +25,16 @@ * of the possibility of such damages. */ #include <d3d11.h> -#include "DiligentCore/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h"
\ No newline at end of file +#include "DiligentCore/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h" + +void TestSwapChainD3D11CInterface(ISwapChainD3D11* pSwapChain) +{ + struct ITextureViewD3D11* pRTV = ISwapChainD3D11_GetCurrentBackBufferRTV(pSwapChain); + struct ITextureViewD3D11* pDSV = ISwapChainD3D11_GetDepthBufferDSV(pSwapChain); + + IDXGISwapChain* pDXGISwapChain = ISwapChainD3D11_GetDXGISwapChain(pSwapChain); + + (void)pRTV; + (void)pDSV; + (void)pDXGISwapChain; +} |
