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

[#20] Added Doxygen comments to context and general file descriptions

parent 1a086ca5
No related branches found
No related tags found
1 merge request!11Resolve "Add Doxygen comments to existing code"
/**
* @authors Tobias Frisch, Vanessa Karolek, Katharina Krämer, Sebastian Gaida
* @file src/vkcv/Context.cpp
* @brief Context class to handle instance, physical-device and device
*/
#include "Context.hpp"
#include "CoreManager.hpp"
......
#pragma once
/**
* @authors Tobias Frisch, Vanessa Karolek, Katharina Krämer, Sebastian Gaida
* @file src/vkcv/Context.hpp
* @brief Context class to handle instance, physical-device and device
*/
#include <vulkan/vulkan.hpp>
namespace vkcv {
......@@ -9,27 +15,91 @@ namespace vkcv {
vk::PhysicalDevice m_physicalDevice;
vk::Device m_device;
/**
* 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);
public:
/**
* Copy-constructor of #Context is deleted!
*
* @param other Other instance of #Context
*/
Context(const Context &other) = delete;
/**
* Move-constructor of #Context uses default behavior!
*
* @param other Other instance of #Context
*/
Context(Context &&other) = default;
/**
* Get the Vulkan handle for the instance.
*
* @return Vulkan-Instance
*/
[[nodiscard]]
const vk::Instance& getInstance() const;
/**
* Get the Vulkan handle for the physical-device.
*
* @return Vulkan-PhysicalDevice
*/
[[nodiscard]]
const vk::PhysicalDevice& getPhysicalDevice() const;
/**
* Get the Vulkan handle for the device.
*
* @return Vulkan-Device
*/
[[nodiscard]]
const vk::Device& getDevice() const;
/**
* Destructor of #Context
*/
virtual ~Context();
/**
* Copy-operator of #Context is deleted!
*
* @param other Other instance of #Context
* @return Reference to itself
*/
Context& operator=(const Context &other) = delete;
/**
* Move-operator of #Context uses default behavior!
*
* @param other Other instance of #Context
* @return Reference to itself
*/
Context& operator=(Context &&other) = default;
/**
* Creates a #Context with given @p applicationName and @p applicationVersion for your application.
*
* It is also possible to require a specific amount of queues, ask for specific queue-flags or
* extensions. This function will take care of the required arguments as best as possible.
*
* To pass a valid version for your application, you should use #VK_MAKE_VERSION().
*
* @param[in] applicationName Name of the application
* @param[in] applicationVersion Version of the application
* @param[in] queueCount (optional) Amount of queues which is requested
* @param[in] queueFlags (optional) Requested flags of queues
* @param[in] instanceExtensions (optional) Requested instance extensions
* @param[in] deviceExtensions (optional) Requested device extensions
* @return New instance of #Context
*/
static Context create(const char* applicationName, uint32_t applicationVersion, uint32_t queueCount = 1, std::vector<vk::QueueFlagBits> queueFlags = {}, std::vector<const char*> instanceExtensions = {}, std::vector<const char*> deviceExtensions = {});
/**
......
/**
* @authors Sebastian Gaida
* @file src/vkcv/CoreManager.cpp
* @brief Handling of global states regarding dependencies
*/
#include "CoreManager.hpp"
......
#pragma once
/**
* @authors Sebastian Gaida
* @file src/vkcv/CoreManager.hpp
* @brief Handling of global states regarding dependencies
*/
#include <GLFW/glfw3.h>
#include <stdexcept>
......
/**
* @authors Sebastian Gaida
* @file src/vkcv/Window.cpp
* @brief Window class to handle a basic rendering surface and input
*/
#include "Window.hpp"
#include "CoreManager.hpp"
......
#pragma once
/**
* @authors Sebastian Gaida
* @file src/vkcv/Window.hpp
* @brief Window class to handle a basic rendering surface and input
*/
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
......
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