diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-12-23 15:02:39 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-12-23 15:02:39 -0300 |
commit | 75337ae1c59e8b2c3bc6fbcd7ccafc7a8205d6b2 (patch) | |
tree | 10b33abdf881e33ff20b7a11a789f62dd05124cf /src/vk/view_2d.hpp | |
parent | 1cd2d838bf1682e125d52d12ac6f2960df65c7e0 (diff) |
feat Add size to projections in 2D views
Diffstat (limited to 'src/vk/view_2d.hpp')
-rw-r--r-- | src/vk/view_2d.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vk/view_2d.hpp b/src/vk/view_2d.hpp index f49c3be..caa3d0f 100644 --- a/src/vk/view_2d.hpp +++ b/src/vk/view_2d.hpp @@ -31,6 +31,7 @@ namespace VK struct View2D { glm::vec4 region; + float projection_width, projection_height; // FIXME: if these vectors get resized, they can cause a segmentation fault! std::vector<UniformBuffer> ub_2d; @@ -43,7 +44,7 @@ struct View2D std::unordered_map<std::shared_ptr<Sprite>, std::vector<glm::vec4>>> sprites_to_draw; - View2D(glm::vec4 region); + View2D(glm::vec4 region, float projection_width, float projection_height); virtual ~View2D(); void |