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

moving code around

This commit is contained in:
VB
2017-06-30 10:39:31 +02:00
parent 9934fd196d
commit 4b3d038c2b
4 changed files with 41 additions and 36 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;
shader.set_ambient(glm::make_vec3(&cablight.x));
GfxRenderer.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 };
shader.set_ambient(glm::make_vec3(ambient));
GfxRenderer.shader.set_ambient(glm::make_vec3(ambient));
}
}
glPopMatrix();