From b4152d9634984d75d0c591957feb9db534b890a6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 23 Mar 2017 14:53:08 +0000 Subject: [PATCH] Added simple fallback from osg::Material::apply() when fixed function pipeline is disabled --- src/osg/Material.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/osg/Material.cpp b/src/osg/Material.cpp index 318d783df..8385809fe 100644 --- a/src/osg/Material.cpp +++ b/src/osg/Material.cpp @@ -12,6 +12,7 @@ */ #include #include +#include #include using namespace osg; @@ -350,9 +351,9 @@ void Material::setAlpha(Face face,float alpha) } } +#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE void Material::apply(State&) const { -#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE #ifdef OSG_GL1_AVAILABLE if (_colorMode==OFF) @@ -438,7 +439,12 @@ void Material::apply(State&) const glMaterialf( GL_FRONT, GL_SHININESS, _shininessFront ); glMaterialf( GL_BACK, GL_SHININESS, _shininessBack ); } -#else - OSG_NOTICE<<"Warning: Material::apply(State&) - not supported."<