1
0
Fork 0

rename /sim/rendering/rembrandt -> /sim/rendering/rembrandt/enabled

and put rembrandt-related properties in /sim/rendering/rembrandt/
This commit is contained in:
Frederic Bouvier 2012-05-08 17:14:55 +02:00
parent dd8d9a6f60
commit 6b2ba60772
2 changed files with 8 additions and 8 deletions

View file

@ -1322,9 +1322,9 @@ struct OptionDesc {
} fgOptionArray[] = { } fgOptionArray[] = {
{"language", true, OPTION_IGNORE, "", false, "", 0 }, {"language", true, OPTION_IGNORE, "", false, "", 0 },
{"disable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt", false, "", 0 }, {"disable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt/enabled", false, "", 0 },
{"enable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt", true, "", 0 }, {"enable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt/enabled", true, "", 0 },
{"renderer", true, OPTION_STRING, "/sim/rendering/renderer", false, "", 0 }, {"renderer", true, OPTION_STRING, "/sim/rendering/rembrandt/renderer", false, "", 0 },
{"disable-game-mode", false, OPTION_BOOL, "/sim/startup/game-mode", false, "", 0 }, {"disable-game-mode", false, OPTION_BOOL, "/sim/startup/game-mode", false, "", 0 },
{"enable-game-mode", false, OPTION_BOOL, "/sim/startup/game-mode", true, "", 0 }, {"enable-game-mode", false, OPTION_BOOL, "/sim/startup/game-mode", true, "", 0 },
{"disable-splash-screen", false, OPTION_BOOL, "/sim/startup/splash-screen", false, "", 0 }, {"disable-splash-screen", false, OPTION_BOOL, "/sim/startup/splash-screen", false, "", 0 },

View file

@ -502,7 +502,7 @@ public:
void void
FGRenderer::init( void ) FGRenderer::init( void )
{ {
_classicalRenderer = !fgGetBool("/sim/rendering/rembrandt", false); _classicalRenderer = !fgGetBool("/sim/rendering/rembrandt/enabled", false);
_shadowMapSize = fgGetInt( "/sim/rendering/shadows/map-size", 4096 ); _shadowMapSize = fgGetInt( "/sim/rendering/shadows/map-size", 4096 );
fgAddChangeListener( new ShadowMapSizeListener, "/sim/rendering/shadows/map-size" ); fgAddChangeListener( new ShadowMapSizeListener, "/sim/rendering/shadows/map-size" );
fgAddChangeListener( new ShadowEnabledListener, "/sim/rendering/shadows/enabled" ); fgAddChangeListener( new ShadowEnabledListener, "/sim/rendering/shadows/enabled" );
@ -522,10 +522,10 @@ FGRenderer::init( void )
updateCascadeFar(1, _cascadeFar[1]); updateCascadeFar(1, _cascadeFar[1]);
updateCascadeFar(2, _cascadeFar[2]); updateCascadeFar(2, _cascadeFar[2]);
updateCascadeFar(3, _cascadeFar[3]); updateCascadeFar(3, _cascadeFar[3]);
_useColorForDepth = fgGetBool( "/sim/rendering/use-color-for-depth", false ); _useColorForDepth = fgGetBool( "/sim/rendering/rembrandt/use-color-for-depth", false );
_depthInColor->set( _useColorForDepth ); _depthInColor->set( _useColorForDepth );
_renderer = fgGetString("/sim/rendering/renderer", ""); _renderer = fgGetString("/sim/rendering/rembrandt/renderer", "");
if (!_classicalRenderer && !_renderer.empty()) if (!_classicalRenderer && !_renderer.empty())
_pipeline = makeRenderingPipeline(_renderer, 0); _pipeline = makeRenderingPipeline(_renderer, 0);
_scenery_loaded = fgGetNode("/sim/sceneryloaded", true); _scenery_loaded = fgGetNode("/sim/sceneryloaded", true);
@ -774,7 +774,7 @@ osg::Texture2D* buildDeferredBuffer(GLint internalFormat, GLenum sourceFormat, G
return tex; return tex;
} }
void buildDeferredBuffers( CameraInfo* info, int shadowMapSize, bool useColorForDepth ) void buildDefaultDeferredBuffers( CameraInfo* info, int shadowMapSize, bool useColorForDepth )
{ {
if (useColorForDepth) { if (useColorForDepth) {
info->addBuffer("real-depth", buildDeferredBuffer( GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT, GL_FLOAT, osg::Texture::CLAMP_TO_BORDER) ); info->addBuffer("real-depth", buildDeferredBuffer( GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT, GL_FLOAT, osg::Texture::CLAMP_TO_BORDER) );
@ -1336,7 +1336,7 @@ FGRenderer::buildDefaultDeferredPipeline(CameraGroup* cgroup, unsigned flags, os
osg::GraphicsContext* gc) osg::GraphicsContext* gc)
{ {
CameraInfo* info = new CameraInfo(flags); CameraInfo* info = new CameraInfo(flags);
buildDeferredBuffers(info, _shadowMapSize, _useColorForDepth); buildDefaultDeferredBuffers(info, _shadowMapSize, _useColorForDepth);
osg::Camera* geometryCamera = buildDefaultDeferredGeometryCamera( info, gc ); osg::Camera* geometryCamera = buildDefaultDeferredGeometryCamera( info, gc );
cgroup->getViewer()->addSlave(geometryCamera, false); cgroup->getViewer()->addSlave(geometryCamera, false);