16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 09:59:18 +02:00

fixes, fog experiments, add shaders to tree

This commit is contained in:
VB
2017-06-29 13:07:10 +02:00
parent 22f6d1f0f7
commit 2e022a91dd
10 changed files with 248 additions and 50 deletions

View File

@@ -1298,7 +1298,7 @@ TWorld::Render_Cab() {
if( dynamic->InteriorLightLevel > 0.0f ) {
// crude way to light the cabin, until we have something more complete in place
auto const cablight = dynamic->InteriorLight * dynamic->InteriorLightLevel;
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, &cablight.x );
shader.set_ambient(glm::make_vec3(&cablight.x));
}
// render
GfxRenderer.Render( dynamic->mdKabina, dynamic->Material(), 0.0 );
@@ -1311,7 +1311,7 @@ TWorld::Render_Cab() {
if( dynamic->InteriorLightLevel > 0.0f ) {
// reset the overall ambient
GLfloat ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f };
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, ambient );
shader.set_ambient(glm::make_vec3(ambient));
}
}
glPopMatrix();