diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-04 18:46:10 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-04 18:46:10 +0200 |
| commit | 3091227ae4eecf837dd2faecf572bbb3a08de9de (patch) | |
| tree | 1d7b5f3ef1ec77c04e32611f9ff6ce644dc4a0a4 /main.cpp | |
| parent | b4b810450d14fbe718bc55fe005e76d886a419bf (diff) | |
a
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -84,8 +84,8 @@ chunk app::make_test_chunk() x.ground_image = { atlas, (std::uint8_t)(k % atlas->size()) }; }); c[{N/2 + 1, N/2}].wall_north = { wall1, 0 }; - c[{N/2 + 1, N/2 + 1}].wall_north = { wall1, 0 }; c[{N/2, N/2}].wall_north = { wall1, 0 }; + c[{N/2, N/2}].wall_west = { wall1, 0 }; return c; } @@ -158,10 +158,12 @@ app::app(const Arguments& arguments): void app::drawEvent() { GL::defaultFramebuffer.clear(GL::FramebufferClear::Color); - //GL::defaultFramebuffer.clear(GL::FramebufferClear::Depth); - //GL::Renderer::setDepthMask(true); - //GL::Renderer::setDepthFunction(GL::Renderer::DepthFunction::LessOrEqual); - //GL::Renderer::enable(GL::Renderer::Feature::DepthTest); +#if 1 + GL::defaultFramebuffer.clear(GL::FramebufferClear::Depth); + GL::Renderer::setDepthMask(true); + GL::Renderer::setDepthFunction(GL::Renderer::DepthFunction::LessOrEqual); + GL::Renderer::enable(GL::Renderer::Feature::DepthTest); +#endif update_window_scale(); { @@ -214,7 +216,8 @@ void app::do_camera(float dt) void app::reset_camera_offset() { - camera_offset = _shader.project({TILE_MAX_DIM*TILE_SIZE[0]/2.f, TILE_MAX_DIM*TILE_SIZE[1]/2.f, 0}); + //camera_offset = _shader.project({TILE_MAX_DIM*TILE_SIZE[0]/2.f, TILE_MAX_DIM*TILE_SIZE[1]/2.f, 0}); + camera_offset = {}; } void app::update(float dt) |
