diff options
Diffstat (limited to 'src/World/Clouds.hpp')
| -rw-r--r-- | src/World/Clouds.hpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/World/Clouds.hpp b/src/World/Clouds.hpp index 4bd0637..7246e7b 100644 --- a/src/World/Clouds.hpp +++ b/src/World/Clouds.hpp @@ -1,8 +1,7 @@ #pragma once #include "../Time.hpp" -#include "../GFX/Shading/Program.hpp" -#include "../GFX/Shading/Uniform.hpp" +#include "../GFX/Actions.hpp" #include "../GFX/Camera.hpp" #include "../GFX/Mesh.hpp" @@ -10,10 +9,10 @@ namespace MC::World { class Clouds { public: - Clouds(Real ascept, Real fov, Real near, Real far, Vector<3, F32> sky_color, Vector<3, F32> sun_direction); + Clouds() : m_mesh(create_mesh(create_cloud_matrix())) {} - void update(const Time& time); - void render(const GFX::Camera& camera); + void update(Time const& time); + void render(GFX::Actions& actions, Position::World player_position); private: constexpr static U32 CloudMatrixSize = 128; constexpr static Int Height = 200; @@ -22,22 +21,13 @@ private: using CloudMatrix = Matrix<CloudMatrixSize, CloudMatrixSize, Bool>; - void render_single_instance(const GFX::Camera& camera, Int x, Int y); + void render_single_instance(GFX::Actions& actions, Int x, Int y); static CloudMatrix create_cloud_matrix(); - static GFX::Mesh create_mesh(const CloudMatrix& cloud_matrix); - - static const Char* vertex; - static const Char* fragment; + static GFX::Mesh create_mesh(CloudMatrix const& cloud_matrix); Real m_x_offset = 0.0; - - GFX::Shading::Program m_program; GFX::Mesh m_mesh; - - GFX::Shading::Uniform m_model_uniform; - GFX::Shading::Uniform m_view_uniform; - GFX::Shading::Uniform m_projection_uniform; }; } |
