Added CMake support for specifying what OpenGL target and features that the OpenSceneGraph build should use.

Added use of the new Cmake generated #define's for optionally compiling parts of the OpenSceneGraph's OpenGL support for the various OpenGL targets
This commit is contained in:
Robert Osfield
2009-10-23 13:19:57 +00:00
parent 023fb109a3
commit 327b67a305
26 changed files with 174 additions and 32 deletions

View File

@@ -12,8 +12,10 @@
*/
#include <string.h>
#include <string>
#include <osg/GL>
#include <osg/LightModel>
#include <osg/Notify>
using namespace osg;
@@ -48,6 +50,7 @@ LightModel::~LightModel()
void LightModel::apply(State&) const
{
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr());
static bool s_separateSpecularSupported = strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0;
@@ -65,5 +68,8 @@ void LightModel::apply(State&) const
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,_localViewer);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,_twoSided);
#else
osg::notify(osg::NOTICE)<<"Warning: LightModel::apply(State&) - not supported."<<std::endl;
#endif
}