dynamically assigned render lights

This commit is contained in:
tmj-fstate
2017-02-27 02:58:38 +01:00
parent 0752024d47
commit 80b8da6749
16 changed files with 344 additions and 158 deletions

View File

@@ -36,7 +36,7 @@ void TSky::Render( float3 const &Tint )
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
#else
::glEnable( GL_LIGHTING );
::glDisable( GL_LIGHT0 );
GfxRenderer.Disable_Lights();
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, &Tint.x );
#endif
if (Global::bUseVBO)
@@ -56,7 +56,7 @@ void TSky::Render( float3 const &Tint )
#else
GLfloat noambient[] = { 0.0f, 0.0f, 0.0f, 1.0f };
::glLightModelfv( GL_LIGHT_MODEL_AMBIENT, noambient );
::glEnable( GL_LIGHT0 );
::glEnable( GL_LIGHT0 ); // other lights will be enabled during lights update
::glDisable( GL_LIGHTING );
#endif
}