From cb3ddae385c03a8830d39dc37fcd5bf273524d5e Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 10 Oct 2022 16:23:26 +0200 Subject: Try to add second VBO --- src/Image/RawImage.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/Image/RawImage.hpp') diff --git a/src/Image/RawImage.hpp b/src/Image/RawImage.hpp index 4414ee0..6c4b122 100644 --- a/src/Image/RawImage.hpp +++ b/src/Image/RawImage.hpp @@ -8,9 +8,10 @@ namespace MC::Image { class RawImage { public: - RawImage() : m_pixels() {}; + RawImage() : m_pixels(), m_width(0), m_height(0), m_channels(0) {}; - explicit RawImage(size_t pixel_count) : m_pixels() { + explicit RawImage(size_t pixel_count, uint32_t width, uint32_t height, uint8_t channels) + : m_pixels(), m_width(width), m_height(height), m_channels(channels) { m_pixels.reserve(pixel_count); } @@ -20,11 +21,17 @@ public: void add(Pixel pixel); - size_t size(); - uint8_t* raw(); + size_t size() const; + uint8_t* raw() const; + uint32_t width() const; + uint32_t height() const; + uint8_t channels() const; private: std::vector m_pixels; + + uint32_t m_width, m_height; + uint8_t m_channels; }; } -- cgit 1.4.1