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

environment-centric light level, groundwork for delayed texture upload, minor bug fixes

This commit is contained in:
tmj-fstate
2017-03-18 01:37:00 +01:00
parent 441b39ce5f
commit 775e959bc9
10 changed files with 277 additions and 95 deletions

View File

@@ -94,8 +94,10 @@ void make_screenshot()
void window_resize_callback(GLFWwindow *window, int w, int h)
{
Global::ScreenWidth = w;
Global::ScreenHeight = h;
// NOTE: we have two variables which basically do the same thing as we don't have dynamic fullscreen toggle
// TBD, TODO: merge them?
Global::ScreenWidth = Global::iWindowWidth = w;
Global::ScreenHeight = Global::iWindowHeight = h;
Global::fDistanceFactor = std::max( 0.5f, h / 768.0f ); // not sure if this is really something we want to use
glViewport(0, 0, w, h);
}