summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src/TestTessellation.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-02-17 04:13:18 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-02-17 04:13:18 +0000
commit474c66c48dfeaa19f81789345b08d1267364b221 (patch)
tree65db00069aa643caf9c5de68a4e874a9ffb410ff /Tests/TestApp/src/TestTessellation.cpp
parentEnabled test app in MacOS (diff)
downloadDiligentEngine-474c66c48dfeaa19f81789345b08d1267364b221.tar.gz
DiligentEngine-474c66c48dfeaa19f81789345b08d1267364b221.zip
Enabled TestApp on iOS
Diffstat (limited to 'Tests/TestApp/src/TestTessellation.cpp')
-rw-r--r--Tests/TestApp/src/TestTessellation.cpp9
1 files changed, 9 insertions, 0 deletions
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);