From 9c56a57de3d285b4c8593976b7cf6b6a1a75e5ac Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 15 Jul 2002 13:20:41 +0000 Subject: [PATCH] Fixed the orientation of the osgreflect demo so that the reflection plane is orientated towards the viewer. Changed the lightmodel ambient level to 0.1,0.1,0.1 instead of 0.0, so that a small amount of ambient lighting is available to render back surfaces. The osgreflect and osgprerender suffered unexpected behaviors because of no lighting on the backfaces. --- Make/debugtests.bat | 4 ++-- Make/osgtests.bat | 4 ++-- src/osgUtil/SceneView.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Make/debugtests.bat b/Make/debugtests.bat index d5c0a9cf9..62cba60f8 100755 --- a/Make/debugtests.bat +++ b/Make/debugtests.bat @@ -66,8 +66,8 @@ echo osgmultitexture cessnafire.osg osmultitexture cessnafire.osg more memleaks.log -echo osgreflect cow.osg -osgreflect cow.osg +echo osgreflect cessna.osg +osgreflect cessna.osg more memleaks.log echo osgscribe cow.osg diff --git a/Make/osgtests.bat b/Make/osgtests.bat index 516483668..dc7c2bd8b 100755 --- a/Make/osgtests.bat +++ b/Make/osgtests.bat @@ -49,8 +49,8 @@ osgimpostor Town.osg echo osgmultitexture cessnafire.osg osgmultitexture cessnafire.osg -echo osgreflect cow.osg -osgreflect cow.osg +echo osgreflect cessna.osg +osgreflect cessna.osg echo osgscribe cow.osg osgscribe cow.osg diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index 82fd0874a..2b6e42cbc 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -104,7 +104,7 @@ void SceneView::setDefaults() _globalState->setTextureAttributeAndModes(0,texenv, osg::StateAttribute::ON); osg::LightModel* lightmodel = osgNew osg::LightModel; - lightmodel->setAmbientIntensity(osg::Vec4(0.0f,0.0f,0.0f,1.0f)); + lightmodel->setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f)); _globalState->setAttributeAndModes(lightmodel, osg::StateAttribute::ON); _backgroundColor.set(0.2f, 0.2f, 0.4f, 1.0f);