diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-02-17 04:13:18 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-02-17 04:13:18 +0000 |
| commit | 474c66c48dfeaa19f81789345b08d1267364b221 (patch) | |
| tree | 65db00069aa643caf9c5de68a4e874a9ffb410ff /Tests/TestApp/src/TestGeometryShader.cpp | |
| parent | Enabled test app in MacOS (diff) | |
| download | DiligentEngine-474c66c48dfeaa19f81789345b08d1267364b221.tar.gz DiligentEngine-474c66c48dfeaa19f81789345b08d1267364b221.zip | |
Enabled TestApp on iOS
Diffstat (limited to 'Tests/TestApp/src/TestGeometryShader.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestGeometryShader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/TestApp/src/TestGeometryShader.cpp b/Tests/TestApp/src/TestGeometryShader.cpp index 9492c93..a4982db 100644 --- a/Tests/TestApp/src/TestGeometryShader.cpp +++ b/Tests/TestApp/src/TestGeometryShader.cpp @@ -33,6 +33,12 @@ using namespace Diligent; void TestGeometryShader::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext) { + if(!pDevice->GetDeviceCaps().bGeometryShadersSupported) + { + LOG_WARNING_MESSAGE("Geometry shaders are not supported"); + return; + } + m_pDeviceContext = pDeviceContext; ShaderCreationAttribs CreationAttrs; @@ -76,6 +82,9 @@ void TestGeometryShader::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCo void TestGeometryShader::Draw() { + if(!m_pDeviceContext) + return; + m_pDeviceContext->SetPipelineState(m_pPSO); m_pDeviceContext->CommitShaderResources(nullptr, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES); |
