From 4c4738eced489aebe6d15a867fe20b9b2dee472d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 3 Mar 2015 12:00:52 +0000 Subject: [PATCH] Re-organized the #ifdef's to avoid usage of glPolyginMode under GLES git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14751 16af8721-9629-0410-8352-f15c8da7e697 --- src/osg/PolygonMode.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/osg/PolygonMode.cpp b/src/osg/PolygonMode.cpp index 4beafa11b..947b20d55 100644 --- a/src/osg/PolygonMode.cpp +++ b/src/osg/PolygonMode.cpp @@ -68,6 +68,7 @@ PolygonMode::Mode PolygonMode::getMode(Face face) const void PolygonMode::apply(State&) const { +#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) if (_modeFront==_modeBack) { glPolygonMode(GL_FRONT_AND_BACK,(GLenum)_modeFront); @@ -75,11 +76,14 @@ void PolygonMode::apply(State&) const else { #ifdef OSG_GL1_AVAILABLE - glPolygonMode(GL_FRONT,(GLenum)_modeFront); - glPolygonMode(GL_BACK,(GLenum)_modeBack); + glPolygonMode(GL_FRONT,(GLenum)_modeFront); + glPolygonMode(GL_BACK,(GLenum)_modeBack); #else OSG_NOTICE << "Warning: PolygonMode::apply(State&) - only GL_FRONT_AND_BACK is supported." << std::endl; #endif } +#else + OSG_NOTICE << "Warning: PolygonMode::apply(State&) - is not supported." << std::endl; +#endif }