From 75337ae1c59e8b2c3bc6fbcd7ccafc7a8205d6b2 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Fri, 23 Dec 2022 15:02:39 -0300 Subject: feat Add size to projections in 2D views --- src/vk/view_2d.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vk/view_2d.hpp') 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 ub_2d; @@ -43,7 +44,7 @@ struct View2D std::unordered_map, std::vector>> sprites_to_draw; - View2D(glm::vec4 region); + View2D(glm::vec4 region, float projection_width, float projection_height); virtual ~View2D(); void -- cgit v1.2.3