Skip to content
Snippets Groups Projects
Verified Commit f266bf15 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Added doxygen comments to handles and adjusted enum classes

parent 1c2d345d
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace vkcv { namespace vkcv {
/** /**
* @brief Template class for buffer management and filling data. * @brief Template class for buffer handling and filling data.
* *
* @tparam T Buffer content type * @tparam T Buffer content type
*/ */
......
...@@ -13,7 +13,10 @@ namespace vkcv ...@@ -13,7 +13,10 @@ namespace vkcv
{ {
typedef typename event_function<uint64_t>::type HandleDestroyFunction; typedef typename event_function<uint64_t>::type HandleDestroyFunction;
/**
* Class for general memory management via handles.
*/
class Handle { class Handle {
friend std::ostream& operator << (std::ostream& out, const Handle& handle); friend std::ostream& operator << (std::ostream& out, const Handle& handle);
...@@ -88,50 +91,73 @@ namespace vkcv ...@@ -88,50 +91,73 @@ namespace vkcv
* @return Output stream after printing * @return Output stream after printing
*/ */
std::ostream& operator << (std::ostream& out, const Handle& handle); std::ostream& operator << (std::ostream& out, const Handle& handle);
// Handle returned for any buffer created with the core/context objects /**
* @brief Handle class for buffers.
*/
class BufferHandle : public Handle { class BufferHandle : public Handle {
friend class BufferManager; friend class BufferManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for render passes.
*/
class PassHandle : public Handle { class PassHandle : public Handle {
friend class PassManager; friend class PassManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for graphics pipelines.
*/
class GraphicsPipelineHandle : public Handle { class GraphicsPipelineHandle : public Handle {
friend class GraphicsPipelineManager; friend class GraphicsPipelineManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for compute pipelines.
*/
class ComputePipelineHandle : public Handle { class ComputePipelineHandle : public Handle {
friend class ComputePipelineManager; friend class ComputePipelineManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for descriptor sets.
*/
class DescriptorSetHandle : public Handle { class DescriptorSetHandle : public Handle {
friend class DescriptorManager; friend class DescriptorManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for descriptor set layouts.
*/
class DescriptorSetLayoutHandle : public Handle { class DescriptorSetLayoutHandle : public Handle {
friend class DescriptorManager; friend class DescriptorManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for samplers.
*/
class SamplerHandle : public Handle { class SamplerHandle : public Handle {
friend class SamplerManager; friend class SamplerManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for images.
*/
class ImageHandle : public Handle { class ImageHandle : public Handle {
friend class ImageManager; friend class ImageManager;
private: private:
...@@ -156,18 +182,27 @@ namespace vkcv ...@@ -156,18 +182,27 @@ namespace vkcv
}; };
/**
* @brief Handle class for windows.
*/
class WindowHandle : public Handle { class WindowHandle : public Handle {
friend class WindowManager; friend class WindowManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for swapchains.
*/
class SwapchainHandle : public Handle { class SwapchainHandle : public Handle {
friend class SwapchainManager; friend class SwapchainManager;
private: private:
using Handle::Handle; using Handle::Handle;
}; };
/**
* @brief Handle class for command streams.
*/
class CommandStreamHandle : public Handle { class CommandStreamHandle : public Handle {
friend class CommandStreamManager; friend class CommandStreamManager;
private: private:
......
...@@ -23,6 +23,9 @@ namespace vkcv { ...@@ -23,6 +23,9 @@ namespace vkcv {
*/ */
bool isDepthFormat(const vk::Format format); bool isDepthFormat(const vk::Format format);
/**
* @brief Class for image handling and filling data.
*/
class Image { class Image {
friend class Core; friend class Core;
public: public:
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
namespace vkcv { namespace vkcv {
/** /**
* Enum class to specify the level of logging. * @brief Enum class to specify the level of logging.
*/ */
enum class LogLevel { enum class LogLevel {
RAW_INFO, RAW_INFO,
......
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
#include "Logger.hpp" #include "Logger.hpp"
namespace vkcv { namespace vkcv {
/**
* @brief Class to handle push constants data per drawcall.
*/
class PushConstants { class PushConstants {
private: private:
std::vector<uint8_t> m_data; std::vector<uint8_t> m_data;
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
*/ */
namespace vkcv { namespace vkcv {
/**
* @brief Enum class to specify the result of a function call.
*/
enum class Result { enum class Result {
SUCCESS = 0, SUCCESS = 0,
ERROR = 1 ERROR = 1
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace vkcv { namespace vkcv {
/** /**
* Enum class to specify a samplers type to filter during access. * @brief Enum class to specify a samplers type to filter during access.
*/ */
enum class SamplerFilterType { enum class SamplerFilterType {
NEAREST = 1, NEAREST = 1,
...@@ -16,7 +16,7 @@ namespace vkcv { ...@@ -16,7 +16,7 @@ namespace vkcv {
}; };
/** /**
* Enum class to specify a samplers mode to access mipmaps. * @brief Enum class to specify a samplers mode to access mipmaps.
*/ */
enum class SamplerMipmapMode { enum class SamplerMipmapMode {
NEAREST = 1, NEAREST = 1,
...@@ -24,7 +24,7 @@ namespace vkcv { ...@@ -24,7 +24,7 @@ namespace vkcv {
}; };
/** /**
* Enum class to specify a samplers mode to access via address space. * @brief Enum class to specify a samplers mode to access via address space.
*/ */
enum class SamplerAddressMode { enum class SamplerAddressMode {
REPEAT = 1, REPEAT = 1,
...@@ -35,7 +35,7 @@ namespace vkcv { ...@@ -35,7 +35,7 @@ namespace vkcv {
}; };
/** /**
* Enum class to specify a samplers color beyond a textures border. * @brief Enum class to specify a samplers color beyond a textures border.
*/ */
enum class SamplerBorderColor { enum class SamplerBorderColor {
INT_ZERO_OPAQUE = 1, INT_ZERO_OPAQUE = 1,
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace vkcv { namespace vkcv {
/**
* @brief Class to manage and reflect shaders as a program.
*/
class ShaderProgram class ShaderProgram
{ {
public: public:
...@@ -97,6 +100,7 @@ namespace vkcv { ...@@ -97,6 +100,7 @@ namespace vkcv {
std::vector<VertexAttachment> m_VertexAttachments; std::vector<VertexAttachment> m_VertexAttachments;
std::unordered_map<uint32_t, DescriptorBindings> m_DescriptorSets; std::unordered_map<uint32_t, DescriptorBindings> m_DescriptorSets;
size_t m_pushConstantsSize = 0; size_t m_pushConstantsSize = 0;
}; };
} }
...@@ -14,7 +14,10 @@ namespace vkcv { ...@@ -14,7 +14,10 @@ namespace vkcv {
const uint32_t MIN_SURFACE_SIZE = 2; const uint32_t MIN_SURFACE_SIZE = 2;
class Surface { /**
* @brief Class to handle surfaces to use with a swapchain.
*/
class Surface final {
private: private:
friend class Swapchain; friend class Swapchain;
friend class SwapchainManager; friend class SwapchainManager;
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
namespace vkcv namespace vkcv
{ {
/**
* @brief Class to handle swapchains using a context.
*/
class Swapchain final { class Swapchain final {
private: private:
friend class Core; friend class Core;
......
...@@ -19,6 +19,9 @@ struct GLFWwindow; ...@@ -19,6 +19,9 @@ struct GLFWwindow;
namespace vkcv { namespace vkcv {
/**
* @brief Class to handle a window.
*/
class Window { class Window {
friend class WindowManager; friend class WindowManager;
friend class SwapchainManager; friend class SwapchainManager;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment