diff options
Diffstat (limited to 'draw/wall.hpp')
| -rw-r--r-- | draw/wall.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/draw/wall.hpp b/draw/wall.hpp index 81c6b60e..d65744fd 100644 --- a/draw/wall.hpp +++ b/draw/wall.hpp @@ -28,6 +28,11 @@ private: Vector2 texcoords; }; + struct constant final { + Vector3 position; + float depth = -1; + }; + using quad = std::array<vertex, 4>; using vertex_array = std::array<quad, COUNT>; using texture_array = std::array<GL::Texture2D*, COUNT>; @@ -40,9 +45,9 @@ private: GL::Mesh _mesh; GL::Buffer _vertex_buffer{vertex_array{}, Magnum::GL::BufferUsage::DynamicDraw}, _index_buffer{make_index_array()}, - _positions_buffer{make_position_array()}; + _constant_buffer{make_constant_array()}; static std::array<std::array<UnsignedShort, 6>, COUNT> make_index_array(); - static std::array<std::array<Vector3, 4>, COUNT> make_position_array(); + static std::array<std::array<constant, 4>, COUNT> make_constant_array(); }; } // namespace floormat |
