From f8ab593c4b10927822c6a7712e050ed39442a9b6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 17 Nov 2009 15:54:20 +0000 Subject: [PATCH] Moved across to use OSG_FIXED_FUNCTION_AVAILABLE --- src/osg/State.cpp | 2 +- src/osg/StateSet.cpp | 2 +- src/osgUtil/SceneView.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index c23a413d6..c7ad80df2 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -46,7 +46,7 @@ State::State(): _projection = _identity; _modelView = _identity; - #if defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) + #if !defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) _useModelViewAndProjectionUniforms = true; _useVertexAttributeAliasing = true; #else diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index a3aba04ae..8c015b5bb 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -534,7 +534,7 @@ void StateSet::setGlobalDefaults() setMode(GL_DEPTH_TEST,StateAttribute::ON); - #if !defined(OSG_GLES2_AVAILABLE) + #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) // setAttributeAndModes(new AlphaFunc,StateAttribute::OFF); setAttributeAndModes(new BlendFunc,StateAttribute::OFF); diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index d34b93dd0..8c891b60c 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -211,7 +211,7 @@ void SceneView::setDefaults(unsigned int options) if ((options & HEADLIGHT) || (options & SKY_LIGHT)) { - #if !defined(OSG_GLES2_AVAILABLE) + #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) _lightingMode=(options&HEADLIGHT) ? HEADLIGHT : SKY_LIGHT; _light = new osg::Light; _light->setLightNum(0); @@ -226,7 +226,7 @@ void SceneView::setDefaults(unsigned int options) _globalStateSet->setMode(GL_LIGHTING, osg::StateAttribute::ON); #endif - #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) + #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) osg::LightModel* lightmodel = new osg::LightModel; lightmodel->setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f)); _globalStateSet->setAttributeAndModes(lightmodel, osg::StateAttribute::ON); @@ -272,7 +272,7 @@ void SceneView::setDefaults(unsigned int options) _globalStateSet->setGlobalDefaults(); - #if !defined(OSG_GLES2_AVAILABLE) + #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) // set up an texture environment by default to speed up blending operations. osg::TexEnv* texenv = new osg::TexEnv; texenv->setMode(osg::TexEnv::MODULATE); @@ -676,7 +676,7 @@ void SceneView::setLightingMode(LightingMode mode) if (_lightingMode!=NO_SCENEVIEW_LIGHT) { - #if !defined(OSG_GLES2_AVAILABLE) + #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) // add GL_LIGHTING mode _globalStateSet->setMode(GL_LIGHTING, osg::StateAttribute::ON); if (_light.valid()) @@ -946,7 +946,7 @@ bool SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod renderStage->setCamera(_camera.get()); #endif - #if !defined(OSG_GLES2_AVAILABLE) + #if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) switch(_lightingMode) { case(HEADLIGHT):