From 8dda69439aae8e8e0a60748ba04791712c2aeeb3 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 3 Jul 2018 08:46:14 -0700 Subject: Updated Math lib tests and render target test --- Tests/TestApp/src/TestRenderTarget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Tests/TestApp/src/TestRenderTarget.cpp') 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 ); -- cgit v1.2.3