diff options
| author | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
| commit | 6b69d4b5b648253f894707723af0e2eae9f71445 (patch) | |
| tree | 0cd0b6c7b18c30abbb2618f553f144d1d06dacba /src/World/Clouds.cpp | |
| parent | 2eef7cf49b7a15559ee7bb6719411bcf67386213 (diff) | |
| download | meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.tar.zst meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.zip | |
Move chunk reification to worker threads and set stage for chunk-unbound lighting
Diffstat (limited to 'src/World/Clouds.cpp')
| -rw-r--r-- | src/World/Clouds.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/World/Clouds.cpp b/src/World/Clouds.cpp index 2e0f76c..2567985 100644 --- a/src/World/Clouds.cpp +++ b/src/World/Clouds.cpp @@ -15,7 +15,7 @@ Clouds::Clouds(Real ascept, Real fov, Real near, Real far, Vector<3, F32> sky_co {GFX::Shading::Shader::Type::Vertex, vertex}, {GFX::Shading::Shader::Type::Fragment, fragment} ), - m_mesh(GFX::Binder::load(create_mesh(create_cloud_matrix()))), + m_mesh(create_mesh(create_cloud_matrix())), m_model_uniform(), m_view_uniform(), m_projection_uniform() { m_program.bind(); @@ -38,7 +38,7 @@ void Clouds::update(const Time& time) { m_x_offset += 5.0 * time.delta(); } -void Clouds::render(const GFX::Camera& camera) const { +void Clouds::render(const GFX::Camera& camera) { auto position = camera.position(); I32 center_x = std::round((position.x() - m_x_offset) / TileSize); @@ -51,7 +51,7 @@ void Clouds::render(const GFX::Camera& camera) const { } } -void Clouds::render_single_instance(const GFX::Camera& camera, Int x, Int y) const { +void Clouds::render_single_instance(const GFX::Camera& camera, Int x, Int y) { Vector<3> position{TileSize * x + m_x_offset, Height, TileSize * y}; m_program.bind(); |
