diff --git a/include/vkcv/Context.hpp b/include/vkcv/Context.hpp index 962289582ca4e6c29929670b467ff3d7a136db39..7d4670c338d7a941835e6375757dd45fe7ef397e 100644 --- a/include/vkcv/Context.hpp +++ b/include/vkcv/Context.hpp @@ -29,24 +29,66 @@ namespace vkcv Context & operator=(const Context &other) = delete; // copy assignment Context & operator=(Context &&other) noexcept; // move assignment + /** + * @brief Returns the vulkan instance of the context. + * + * @return Vulkan instance + */ [[nodiscard]] const vk::Instance &getInstance() const; + /** + * @brief Returns the vulkan physical device of the context. + * + * @return Vulkan physical device + */ [[nodiscard]] const vk::PhysicalDevice &getPhysicalDevice() const; + /** + * @brief Returns the vulkan device of the context. + * + * @return Vulkan device + */ [[nodiscard]] const vk::Device &getDevice() const; + /** + * @brief Returns the feature manager of the context. + * + * @return Feature manager + */ [[nodiscard]] const FeatureManager& getFeatureManager() const; + /** + * @brief Returns the queue manager of the context. + * + * @return Queue manager + */ [[nodiscard]] const QueueManager& getQueueManager() const; + /** + * @brief Returns the VMA allocator of the context. + * + * @return VMA allocator + */ [[nodiscard]] const vma::Allocator& getAllocator() const; - + + /** + * @brief Creates a context for a given application with + * a specific name, version, queue requirements, features and + * required instance extensions. + * + * @param applicationName Application name + * @param applicationVersion Application version + * @param queueFlags Queue flags + * @param features Features + * @param instanceExtensions Instance extensions + * @return New context + */ static Context create(const char *applicationName, uint32_t applicationVersion, const std::vector<vk::QueueFlagBits>& queueFlags, @@ -55,14 +97,19 @@ namespace vkcv private: /** - * Constructor of #Context requires an @p instance, a @p physicalDevice and a @p device. + * @brief Constructor of #Context requires an @p instance, + * a @p physicalDevice and a @p device. * * @param instance Vulkan-Instance * @param physicalDevice Vulkan-PhysicalDevice * @param device Vulkan-Device */ - Context(vk::Instance instance, vk::PhysicalDevice physicalDevice, vk::Device device, - FeatureManager&& featureManager, QueueManager&& queueManager, vma::Allocator&& allocator) noexcept; + Context(vk::Instance instance, + vk::PhysicalDevice physicalDevice, + vk::Device device, + FeatureManager &&featureManager, + QueueManager &&queueManager, + vma::Allocator &&allocator) noexcept; vk::Instance m_Instance; vk::PhysicalDevice m_PhysicalDevice; diff --git a/include/vkcv/Core.hpp b/include/vkcv/Core.hpp index e7e50ca805c944f46cb057fdd61e6dff96e3a65d..6343bf070fbc1003c4813d30cca30e4d32e19864 100644 --- a/include/vkcv/Core.hpp +++ b/include/vkcv/Core.hpp @@ -320,8 +320,6 @@ namespace vkcv */ DescriptorSetLayout getDescriptorSetLayout(const DescriptorSetLayoutHandle handle) const; - // TODO: existsDescriptorSetLayout function that checks and returns fitting layout upon existence. - /** * @brief Creates a new descriptor set *