summaryrefslogtreecommitdiff
path: root/src/vk/view_2d.hpp
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2022-12-23 15:02:39 -0300
committerFrederico Linhares <fred@linhares.blue>2022-12-23 15:02:39 -0300
commit75337ae1c59e8b2c3bc6fbcd7ccafc7a8205d6b2 (patch)
tree10b33abdf881e33ff20b7a11a789f62dd05124cf /src/vk/view_2d.hpp
parent1cd2d838bf1682e125d52d12ac6f2960df65c7e0 (diff)
feat Add size to projections in 2D views
Diffstat (limited to 'src/vk/view_2d.hpp')
-rw-r--r--src/vk/view_2d.hpp3
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