From 020eae4f74d73f1e3958074275132a025ed7b229 Mon Sep 17 00:00:00 2001 From: hybrid Date: Mon, 2 Jul 2007 23:36:10 +0000 Subject: [PATCH] Add compile checks for supported extensions. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@753 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/COpenGLDriver.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index 8b2b64bc..a55dabc5 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -1737,10 +1737,14 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 // The first parts are not correctly working, yet. #if 0 +#ifdef GL_EXT_stencil_two_side if (FeatureAvailable[IRR_EXT_stencil_two_side] && FeatureAvailable[IRR_EXT_stencil_wrap]) { glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); - glEnable(GL_DEPTH_CLAMP_NV); +#ifdef GL_NV_depth_clamp + if (FeatureAvailable[IRR_NV_depth_clamp]) + glEnable(GL_DEPTH_CLAMP_NV); +#endif glDisable(GL_CULL_FACE); if (!zfail) { @@ -1773,7 +1777,9 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 glDrawArrays(GL_TRIANGLES,0,count); } } - else if (FeatureAvailable[IRR_ATI_separate_stencil]) + else +#endif + if (FeatureAvailable[IRR_ATI_separate_stencil]) { glDisable(GL_CULL_FACE); if (!zfail)