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:
parent
5705ad715b
commit
774faa157d
1 changed files with 2 additions and 0 deletions
|
@ -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 );
|
||||||
|
|
Loading…
Add table
Reference in a new issue