1
0
Fork 0

Make it possible for textured object to change color to white when lit by a strong light source. This might affect rendering time a bit

This commit is contained in:
ehofman 2003-09-12 09:27:19 +00:00
parent 5705ad715b
commit 774faa157d

View file

@ -332,6 +332,7 @@ void trRenderFrame( void ) {
// explicitely to black. // explicitely to black.
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black ); glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE ); glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE );
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient ); ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
@ -609,6 +610,7 @@ void fgRenderFrame() {
// a completely dark scene. So, we set GL_LIGHT_MODEL_AMBIENT // a completely dark scene. So, we set GL_LIGHT_MODEL_AMBIENT
// explicitely to black. // explicitely to black.
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black ); glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient ); ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse ); ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse );