Fix incorrectly hardcoded effect in last Rembrandt stage
This commit is contained in:
parent
f703882ffa
commit
c3de8851f8
2 changed files with 6 additions and 6 deletions
|
@ -1187,18 +1187,18 @@ FGRenderer::buildDeferredFullscreenCamera( flightgear::CameraInfo* info, osg::Gr
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FGRenderer::buildDeferredDisplayCamera( osg::Camera* camera, flightgear::CameraInfo* info, const std::string& name, osg::GraphicsContext* gc )
|
FGRenderer::buildDeferredDisplayCamera( osg::Camera* camera, flightgear::CameraInfo* info, const FGRenderingPipeline::Stage* stage, osg::GraphicsContext* gc )
|
||||||
{
|
{
|
||||||
camera->setName( "DisplayC" );
|
camera->setName( "DisplayC" );
|
||||||
camera->setCullCallback( new FGDeferredRenderingCameraCullCallback( name, info ) );
|
camera->setCullCallback( new FGDeferredRenderingCameraCullCallback( stage->name, info ) );
|
||||||
camera->setReferenceFrame(Transform::ABSOLUTE_RF);
|
camera->setReferenceFrame(Transform::ABSOLUTE_RF);
|
||||||
camera->setAllowEventFocus(false);
|
camera->setAllowEventFocus(false);
|
||||||
osg::Geometry* g = osg::createTexturedQuadGeometry( osg::Vec3(-1.,-1.,0.), osg::Vec3(2.,0.,0.), osg::Vec3(0.,2.,0.) );
|
osg::Geometry* g = osg::createTexturedQuadGeometry( osg::Vec3(-1.,-1.,0.), osg::Vec3(2.,0.,0.), osg::Vec3(0.,2.,0.) );
|
||||||
g->setUseDisplayList(false); //DEBUG
|
g->setUseDisplayList(false); //DEBUG
|
||||||
simgear::EffectGeode* eg = new simgear::EffectGeode;
|
simgear::EffectGeode* eg = new simgear::EffectGeode;
|
||||||
simgear::Effect* effect = simgear::makeEffect("Effects/display", true);
|
simgear::Effect* effect = simgear::makeEffect(stage->effect, true);
|
||||||
if (!effect) {
|
if (!effect) {
|
||||||
SG_LOG(SG_VIEW, SG_ALERT, "Effects/display not found");
|
SG_LOG(SG_VIEW, SG_ALERT, stage->effect + " not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
eg->setEffect(effect);
|
eg->setEffect(effect);
|
||||||
|
@ -1237,7 +1237,7 @@ FGRenderer::buildStage(CameraInfo* info,
|
||||||
camera = buildDeferredFullscreenCamera(info, gc, stage);
|
camera = buildDeferredFullscreenCamera(info, gc, stage);
|
||||||
else if (stage->type == "display") {
|
else if (stage->type == "display") {
|
||||||
camera = mainCamera;
|
camera = mainCamera;
|
||||||
buildDeferredDisplayCamera(camera, info, stage->name, gc);
|
buildDeferredDisplayCamera(camera, info, stage, gc);
|
||||||
} else
|
} else
|
||||||
throw sg_exception("Stage type is not supported");
|
throw sg_exception("Stage type is not supported");
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ protected:
|
||||||
osg::Camera* buildDeferredLightingCamera( flightgear::CameraInfo* info, osg::GraphicsContext* gc, const FGRenderingPipeline::Stage* stage );
|
osg::Camera* buildDeferredLightingCamera( flightgear::CameraInfo* info, osg::GraphicsContext* gc, const FGRenderingPipeline::Stage* stage );
|
||||||
osg::Camera* buildDeferredFullscreenCamera( flightgear::CameraInfo* info, osg::GraphicsContext* gc, const FGRenderingPipeline::Stage* stage );
|
osg::Camera* buildDeferredFullscreenCamera( flightgear::CameraInfo* info, osg::GraphicsContext* gc, const FGRenderingPipeline::Stage* stage );
|
||||||
osg::Camera* buildDeferredFullscreenCamera( flightgear::CameraInfo* info, const FGRenderingPipeline::Pass* pass );
|
osg::Camera* buildDeferredFullscreenCamera( flightgear::CameraInfo* info, const FGRenderingPipeline::Pass* pass );
|
||||||
void buildDeferredDisplayCamera( osg::Camera* camera, flightgear::CameraInfo* info, const std::string& name, osg::GraphicsContext* gc );
|
void buildDeferredDisplayCamera( osg::Camera* camera, flightgear::CameraInfo* info, const FGRenderingPipeline::Stage* stage, osg::GraphicsContext* gc );
|
||||||
|
|
||||||
void updateShadowCascade(const flightgear::CameraInfo* info, osg::Camera* camera, osg::Group* grp, int idx, double left, double right, double bottom, double top, double zNear, double f1, double f2);
|
void updateShadowCascade(const flightgear::CameraInfo* info, osg::Camera* camera, osg::Group* grp, int idx, double left, double right, double bottom, double top, double zNear, double f1, double f2);
|
||||||
osg::Vec3 getSunDirection() const;
|
osg::Vec3 getSunDirection() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue