Make the use of the compressed internal format a configuration option.
This commit is contained in:
parent
e563e07d5a
commit
48b4596a5f
1 changed files with 18 additions and 12 deletions
|
@ -455,6 +455,24 @@ FGRenderer::init( void )
|
||||||
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
|
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
|
||||||
distance_attenuation );
|
distance_attenuation );
|
||||||
|
|
||||||
|
if (const char* tc = fgGetString("/sim/rendering/texture-compression")) {
|
||||||
|
if (strcmp(tc, "false") == 0 || strcmp(tc, "off") == 0 ||
|
||||||
|
strcmp(tc, "0") == 0 || strcmp(tc, "no") == 0 ||
|
||||||
|
strcmp(tc, "none") == 0) {
|
||||||
|
SGSceneFeatures::instance()->setTextureCompression(SGSceneFeatures::DoNotUseCompression);
|
||||||
|
} else if (strcmp(tc, "arb") == 0) {
|
||||||
|
SGSceneFeatures::instance()->setTextureCompression(SGSceneFeatures::UseARBCompression);
|
||||||
|
} else if (strcmp(tc, "dxt1") == 0) {
|
||||||
|
SGSceneFeatures::instance()->setTextureCompression(SGSceneFeatures::UseDXT1Compression);
|
||||||
|
} else if (strcmp(tc, "dxt3") == 0) {
|
||||||
|
SGSceneFeatures::instance()->setTextureCompression(SGSceneFeatures::UseDXT3Compression);
|
||||||
|
} else if (strcmp(tc, "dxt5") == 0) {
|
||||||
|
SGSceneFeatures::instance()->setTextureCompression(SGSceneFeatures::UseDXT5Compression);
|
||||||
|
} else {
|
||||||
|
SG_LOG(SG_VIEW, SG_WARN, "Unknown texture compression setting!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// create sky, but can't build until setupView, since we depend
|
// create sky, but can't build until setupView, since we depend
|
||||||
// on other subsystems to be inited, eg Ephemeris
|
// on other subsystems to be inited, eg Ephemeris
|
||||||
_sky = new SGSky;
|
_sky = new SGSky;
|
||||||
|
@ -654,18 +672,6 @@ FGRenderer::update( ) {
|
||||||
_splash_alpha->setDoubleValue(sAlpha);
|
_splash_alpha->setDoubleValue(sAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // OSGFIXME
|
|
||||||
// OSGFIXME: features no longer available or no longer run-time configurable
|
|
||||||
{
|
|
||||||
bool use_point_sprites = _point_sprites->getBoolValue();
|
|
||||||
bool enhanced_lighting = _enhanced_lighting->getBoolValue();
|
|
||||||
bool distance_attenuation = _distance_attenuation->getBoolValue();
|
|
||||||
|
|
||||||
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
|
|
||||||
distance_attenuation );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
||||||
|
|
||||||
// update fog params
|
// update fog params
|
||||||
|
|
Loading…
Add table
Reference in a new issue