diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 11:45:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 11:45:34 +0100 |
commit | ff3a18b1a251a5e85057e52303efa0cdd79e8a66 (patch) | |
tree | 44c2f3a6f69bc922d71063debd14ba669c74ca0d /main/draw.cpp | |
parent | b4770eb85369e91cbf800e8192dac0d8c0c627cf (diff) |
add floor mesh to struct chunk
Diffstat (limited to 'main/draw.cpp')
-rw-r--r-- | main/draw.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/draw.cpp b/main/draw.cpp index 90cf27ce..246d15af 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -69,6 +69,8 @@ void main_impl::draw_world() noexcept auto [minx, maxx, miny, maxy] = get_draw_bounds(); const auto sz = windowSize(); + GL::Renderer::disable(GL::Renderer::Feature::DepthTest); + for (std::int16_t y = miny; y <= maxy; y++) for (std::int16_t x = minx; x <= maxx; x++) { @@ -80,6 +82,8 @@ void main_impl::draw_world() noexcept _floor_mesh.draw(_shader, _world[c]); } + //GL::Renderer::enable(GL::Renderer::Feature::DepthTest); + for (std::int16_t y = miny; y <= maxy; y++) for (std::int16_t x = minx; x <= maxx; x++) { @@ -110,8 +114,8 @@ void main_impl::drawEvent() float dt = timeline.previousFrameDuration(); if (dt > 0) { - const float RC1 = dt_expected.do_sleep ? 1.f : 1.f/10, - RC2 = dt_expected.do_sleep ? 1.f/10 : 1.f/15; + const float RC1 = dt_expected.do_sleep ? 1.f : 1.f/5, + RC2 = 1.f/10; const float alpha1 = dt/(dt + RC1); const float alpha2 = dt/(dt + RC2); |