1
0
Fork 0

Enable EffectCullVisitor

This commit is contained in:
timoore 2009-07-15 23:16:13 +00:00 committed by Tim Moore
parent ca3bd1c309
commit 890b584b8f

View file

@ -23,6 +23,7 @@
#include "WindowSystemAdapter.hxx" #include "WindowSystemAdapter.hxx"
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
#include <simgear/structure/OSGUtils.hxx> #include <simgear/structure/OSGUtils.hxx>
#include <simgear/scene/material/EffectCullVisitor.hxx>
#include <simgear/scene/util/RenderConstants.hxx> #include <simgear/scene/util/RenderConstants.hxx>
#include <algorithm> #include <algorithm>
@ -40,6 +41,7 @@
#include <osgUtil/IntersectionVisitor> #include <osgUtil/IntersectionVisitor>
#include <osgViewer/GraphicsWindow> #include <osgViewer/GraphicsWindow>
#include <osgViewer/Renderer>
namespace flightgear namespace flightgear
{ {
@ -100,14 +102,12 @@ void makeNewProjMat(Matrixd& oldProj, double znear,
void installCullVisitor(Camera* camera) void installCullVisitor(Camera* camera)
{ {
#if 0 // Not yet
osgViewer::Renderer* renderer osgViewer::Renderer* renderer
= static_cast<osgViewer::Renderer*>(camera->getRenderer()); = static_cast<osgViewer::Renderer*>(camera->getRenderer());
for (int i = 0; i < 2; ++i) { for (int i = 0; i < 2; ++i) {
osgUtil::SceneView* sceneView = renderer->getSceneView(i); osgUtil::SceneView* sceneView = renderer->getSceneView(i);
sceneView->setCullVisitor(new simgear::EffectCullVisitor); sceneView->setCullVisitor(new simgear::EffectCullVisitor);
} }
#endif
} }
} }