Re-organized the #ifdef's to avoid usage of glPolyginMode under GLES

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14750 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-03-03 12:00:22 +00:00
parent c8d8a051ad
commit edf27e36ed

View File

@@ -68,18 +68,22 @@ PolygonMode::Mode PolygonMode::getMode(Face face) const
void PolygonMode::apply(State&) const
{
#ifdef OSG_GL1_AVAILABLE
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
if (_modeFront==_modeBack)
{
glPolygonMode(GL_FRONT_AND_BACK,(GLenum)_modeFront);
}
else
{
glPolygonMode(GL_FRONT,(GLenum)_modeFront);
glPolygonMode(GL_BACK,(GLenum)_modeBack);
#ifdef OSG_GL1_AVAILABLE
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&) - not supported."<<std::endl;
OSG_NOTICE << "Warning: PolygonMode::apply(State&) - is not supported." << std::endl;
#endif
}