31 bool m_pixel_data_dirty {
true };
40 [[nodiscard]] std::span<const float>
get_pixel_buffer()
const {
return m_pixel_buffer; }
42 [[nodiscard]] uint32_t
get_width()
const {
return m_width; }
43 [[nodiscard]] uint32_t
get_height()
const {
return m_height; }
51 return static_cast<size_t>(m_width) *
static_cast<size_t>(m_height);
60 return m_pixel_buffer.size() *
sizeof(float);
72 return m_pixel_data_dirty;
83 m_pixel_data_dirty =
false;
96 void set_pixel(uint32_t x, uint32_t y,
float r,
float g,
float b,
float a = 1.0F);
104 [[nodiscard]] std::array<float, 4> get_pixel(uint32_t x, uint32_t y)
const;
113 void fill(
float r,
float g,
float b,
float a = 1.0F);
void clear_gpu_update_flag() override
Clear the dirty flag after GPU upload completes.
uint32_t get_height() const
std::span< const float > get_pixel_buffer() const
Get pixel buffer.
std::vector< float > m_pixel_buffer
bool needs_gpu_update() const override
Check if pixel data changed since last GPU sync.
size_t get_pixel_count() const
Get total number of pixels.
uint32_t get_width() const
size_t get_buffer_size() const
Get buffer size in bytes.
Base class for texture-generating nodes.