diff --git a/include/vkcv/ImageConfig.hpp b/include/vkcv/ImageConfig.hpp index 21e9f6d05ac254e90e29d670304df961099cecef..eca0b8a3f80d3785c17226c3e161bfb6990503a3 100644 --- a/include/vkcv/ImageConfig.hpp +++ b/include/vkcv/ImageConfig.hpp @@ -9,6 +9,9 @@ namespace vkcv { + /** + * Structure to configure image before its creation + */ struct ImageConfig { private: uint32_t m_width; diff --git a/include/vkcv/VertexData.hpp b/include/vkcv/VertexData.hpp index 4ee015db3d0765bc667ef7caf74cf5b2d64a6f45..845b9fba9a646d702377c297112029944a254f17 100644 --- a/include/vkcv/VertexData.hpp +++ b/include/vkcv/VertexData.hpp @@ -32,6 +32,9 @@ namespace vkcv { Bit32 }; + /** + * @brief Class to store the details of vertex data for rendering + */ class VertexData { private: VertexBufferBindings m_bindings; @@ -40,6 +43,12 @@ namespace vkcv { size_t m_count; public: + /** + * @brief Constructor of vertex data by providing an optional vector + * of vertex buffer bindings. + * + * @param[in] bindings Vertex buffer bindings (optional) + */ explicit VertexData(const VertexBufferBindings &bindings = {}); VertexData(const VertexData &other) = default; @@ -50,17 +59,50 @@ namespace vkcv { VertexData &operator=(const VertexData &other) = default; VertexData &operator=(VertexData &&other) noexcept = default; + /** + * @brief Return the used vertex buffer bindings of the vertex data. + * + * @return Vertex buffer bindings + */ [[nodiscard]] const VertexBufferBindings &getVertexBufferBindings() const; + /** + * @brief Set the optional index buffer and its used index bit count. + * + * @param[in] indices Index buffer handle + * @param[in] indexBitCount Index bit count + */ void setIndexBuffer(const BufferHandle &indices, IndexBitCount indexBitCount = IndexBitCount::Bit16); + /** + * @brief Return the handle from the used index buffer of the vertex + * data. + * + * @return Index buffer handle + */ [[nodiscard]] const BufferHandle &getIndexBuffer() const; + /** + * @brief Return the index bit count of the indices used in the + * vertex data. + * + * @return Index bit count + */ [[nodiscard]] IndexBitCount getIndexBitCount() const; + /** + * @brief Set the count of elements to use by the vertex data. + * + * @param count Count of vertex elements + */ void setCount(size_t count); + /** + * @brief Return the count of elements in use by the vertex data. + * + * @return Count of vertex elements + */ [[nodiscard]] size_t getCount() const; };