1
0
Fork 0

Add the posibillity to disable specular highlight because it looks like some implementations switch over to sofware rendering when this is enabled

This commit is contained in:
ehofman 2003-09-12 21:43:01 +00:00
parent 774faa157d
commit 9812739a71
2 changed files with 9 additions and 2 deletions

View file

@ -332,7 +332,9 @@ void trRenderFrame( void ) {
// explicitely to black.
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE );
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
if (fgGetBool("/sim/rendering/specular-highlight"))
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
@ -610,7 +612,9 @@ void fgRenderFrame() {
// a completely dark scene. So, we set GL_LIGHT_MODEL_AMBIENT
// explicitely to black.
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
if (fgGetBool("/sim/rendering/specular-highlight"))
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,
GL_SEPARATE_SPECULAR_COLOR);
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse );

View file

@ -207,6 +207,7 @@ fgSetDefaults ()
fgSetBool("/sim/rendering/horizon-effect", false);
fgSetBool("/sim/rendering/enhanced-lighting", false);
fgSetBool("/sim/rendering/distance-attenuation", false);
fgSetBool("/sim/rendering/specular-highlight", true);
fgSetInt("/sim/startup/xsize", 800);
fgSetInt("/sim/startup/ysize", 600);
fgSetInt("/sim/rendering/bits-per-pixel", 16);
@ -1287,6 +1288,8 @@ struct OptionDesc {
{"enable-enhanced-lighting", false, OPTION_BOOL, "/sim/rendering/enhanced-lighting", true, "", 0 },
{"disable-distance-attenuation", false, OPTION_BOOL, "/sim/rendering/distance-attenuation", false, "", 0 },
{"enable-distance-attenuation", false, OPTION_BOOL, "/sim/rendering/distance-attenuation", true, "", 0 },
{"disable-specular-highlight", false, OPTION_BOOL, "/sim/rendering/specular-highlight", false, "", 0 },
{"enable-specular-highlight", false, OPTION_BOOL, "/sim/rendering/specular-highlight", true, "", 0 },
{"disable-clouds", false, OPTION_BOOL, "/environment/clouds/status", false, "", 0 },
{"enable-clouds", false, OPTION_BOOL, "/environment/clouds/status", true, "", 0 },
#ifdef FG_USE_CLOUDS_3D