diff options
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/buffer.h b/src/buffer.h index 6a0eca3..d867a5a 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -24,6 +24,7 @@ #include "amber/result.h" #include "amber/value.h" #include "src/format.h" +#include "src/image.h" namespace amber { @@ -93,6 +94,15 @@ class Buffer { uint32_t GetHeight() const { return height_; } /// Set the number of elements high for the buffer. void SetHeight(uint32_t height) { height_ = height; } + /// Get the number of elements this buffer is deep. + uint32_t GetDepth() const { return depth_; } + /// Set the number of elements this buffer is deep. + void SetDepth(uint32_t depth) { depth_ = depth; } + + /// Get the image dimensionality. + ImageDimension GetImageDimension() const { return image_dim_; } + /// Set the image dimensionality. + void SetImageDimension(ImageDimension dim) { image_dim_ = dim; } // | ---------- Element ---------- | ElementCount == 1 // | Value | Value | Value | Value | ValueCount == 4 @@ -233,13 +243,15 @@ class Buffer { /// over all ubo, ssbo size and ssbo subdata size calls. uint32_t max_size_in_bytes_ = 0; uint32_t element_count_ = 0; - uint32_t width_ = 0; - uint32_t height_ = 0; + uint32_t width_ = 1; + uint32_t height_ = 1; + uint32_t depth_ = 1; uint32_t mip_levels_ = 1; bool format_is_default_ = false; std::vector<uint8_t> bytes_; Format* format_ = nullptr; Sampler* sampler_ = nullptr; + ImageDimension image_dim_ = ImageDimension::kUnknown; }; } // namespace amber |