From 474c66c48dfeaa19f81789345b08d1267364b221 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 16 Feb 2018 20:13:18 -0800 Subject: Enabled TestApp on iOS --- Tests/TestApp/src/TestTessellation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Tests/TestApp/src/TestTessellation.cpp') diff --git a/Tests/TestApp/src/TestTessellation.cpp b/Tests/TestApp/src/TestTessellation.cpp index ad2e334..8acb890 100644 --- a/Tests/TestApp/src/TestTessellation.cpp +++ b/Tests/TestApp/src/TestTessellation.cpp @@ -33,6 +33,12 @@ using namespace Diligent; void TestTessellation::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext) { + if(!pDevice->GetDeviceCaps().bTessellationSupported) + { + LOG_WARNING_MESSAGE("Tessellation is not supported"); + return; + } + m_pDeviceContext = pDeviceContext; ShaderCreationAttribs CreationAttrs; @@ -113,6 +119,9 @@ void TestTessellation::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont void TestTessellation::Draw() { + if(!m_pDeviceContext) + return; + m_pDeviceContext->SetPipelineState(m_pQuadPSO); m_pDeviceContext->CommitShaderResources(nullptr, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES); -- cgit v1.2.3