mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 07:39:19 +02:00
stars object, interrior lighting level as accessible parameter for dynamic object
This commit is contained in:
23
DynObj.cpp
23
DynObj.cpp
@@ -3807,9 +3807,26 @@ void TDynamicObject::Render()
|
||||
}
|
||||
else
|
||||
{ // wersja Display Lists
|
||||
if (mdLowPolyInt)
|
||||
if (FreeFlyModeFlag ? true : !mdKabina || !bDisplayCab)
|
||||
mdLowPolyInt->Render(ObjSqrDist, ReplacableSkinID, iAlpha);
|
||||
if( mdLowPolyInt ) {
|
||||
// low poly interior
|
||||
if( FreeFlyModeFlag ? true : !mdKabina || !bDisplayCab ) {
|
||||
// enable cab light if needed
|
||||
if( InteriorLightLevel > 0.0f ) {
|
||||
|
||||
// crude way to light the cabin, until we have something more complete in place
|
||||
auto const cablight = InteriorLight * InteriorLightLevel;
|
||||
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, &cablight.x );
|
||||
}
|
||||
|
||||
mdLowPolyInt->Render( ObjSqrDist, ReplacableSkinID, iAlpha );
|
||||
|
||||
if( InteriorLightLevel > 0.0f ) {
|
||||
// reset the overall ambient
|
||||
GLfloat ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, ambient );
|
||||
}
|
||||
}
|
||||
}
|
||||
mdModel->Render(ObjSqrDist, ReplacableSkinID, iAlpha);
|
||||
if (mdLoad) // renderowanie nieprzezroczystego ładunku
|
||||
mdLoad->Render(ObjSqrDist, ReplacableSkinID, iAlpha);
|
||||
|
||||
Reference in New Issue
Block a user