diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-03 15:46:14 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-03 15:46:14 +0000 |
| commit | 8dda69439aae8e8e0a60748ba04791712c2aeeb3 (patch) | |
| tree | a6218da26abb18ea7a249f8426e63d397b1929e3 /Tests/TestApp/src/TestRenderTarget.cpp | |
| parent | Updated unit tests to set DSV format in PSO (diff) | |
| download | DiligentEngine-8dda69439aae8e8e0a60748ba04791712c2aeeb3.tar.gz DiligentEngine-8dda69439aae8e8e0a60748ba04791712c2aeeb3.zip | |
Updated Math lib tests and render target test
Diffstat (limited to 'Tests/TestApp/src/TestRenderTarget.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestRenderTarget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/TestApp/src/TestRenderTarget.cpp b/Tests/TestApp/src/TestRenderTarget.cpp index 84ad661..40f81bc 100644 --- a/Tests/TestApp/src/TestRenderTarget.cpp +++ b/Tests/TestApp/src/TestRenderTarget.cpp @@ -36,7 +36,7 @@ TestRenderTarget::TestRenderTarget() : { } -void TestRenderTarget::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext, float fMinXCoord, float fMinYCoord, float fXExtent, float fYExtent ) +void TestRenderTarget::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext, ISwapChain* pSwapChain, float fMinXCoord, float fMinYCoord, float fXExtent, float fYExtent ) { #if PLATFORM_IOS SetStatus(TestResult::Skipped); @@ -47,6 +47,11 @@ void TestRenderTarget::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont m_pDeviceContext = pDeviceContext; m_pRenderScript = CreateRenderScriptFromFile( "TestRenderTargets.lua", pDevice, pDeviceContext, [&]( ScriptParser *pScriptParser ) { + const auto* BackBufferFmt = pDevice->GetTextureFormatInfo(pSwapChain->GetDesc().ColorBufferFormat).Name; + const auto* DepthBufferFmt = pDevice->GetTextureFormatInfo(pSwapChain->GetDesc().DepthBufferFormat).Name; + pScriptParser->SetGlobalVariable( "extBackBufferFormat", BackBufferFmt ); + pScriptParser->SetGlobalVariable( "extDepthBufferFormat", DepthBufferFmt ); + pScriptParser->SetGlobalVariable( "MinX", fMinXCoord ); pScriptParser->SetGlobalVariable( "MinY", fMinYCoord ); pScriptParser->SetGlobalVariable( "XExt", fXExtent ); |
