| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <nn/gfx/detail/gfx_DataContainer.h> |
| 4 | #include <nn/gfx/gfx_BufferInfoData.h> |
| 5 | #include <nn/gfx/gfx_Enum.h> |
| 6 | |
| 7 | namespace nn::gfx { |
| 8 | |
| 9 | class BufferInfo : public detail::DataContainer<BufferInfoData> { |
| 10 | public: |
| 11 | BufferInfo() {} |
| 12 | |
| 13 | void SetDefault(); |
| 14 | |
| 15 | void SetSize(size_t value) { size = value; } |
| 16 | void SetGpuAccessFlags(int value) { gpuAccessFlag = value; } |
| 17 | size_t GetSize() const { return size; } |
| 18 | int GetGpuAccessFlags() const { return gpuAccessFlag; } |
| 19 | }; |
| 20 | |
| 21 | class BufferTextureViewInfo : public detail::DataContainer<BufferTextureViewInfoData> { |
| 22 | public: |
| 23 | BufferTextureViewInfo() {} |
| 24 | |
| 25 | void SetDefault(); |
| 26 | |
| 27 | void SetImageFormat(ImageFormat value) { format = value; } |
| 28 | void SetOffset(ptrdiff_t value) { offset = value; } |
| 29 | void SetSize(size_t value) { size = value; } |
| 30 | void SetBufferPtr(const void* value) { pBuffer = value; } |
| 31 | |
| 32 | ImageFormat GetImageFormat() const { return static_cast<ImageFormat>(format); } |
| 33 | ptrdiff_t GetOffset() const { return offset; } |
| 34 | size_t GetSize() const { return size; } |
| 35 | |
| 36 | detail::Caster<const void> GetBufferPtr() const { |
| 37 | return detail::Caster<const void>(pBuffer.ptr); |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | } // namespace nn::gfx |