improved docs
This commit is contained in:
parent
c8f1c90f9c
commit
dfe9b1abe9
16 changed files with 315 additions and 40 deletions
|
|
@ -45,14 +45,59 @@ namespace Crafter {
|
|||
VkSemaphore renderComplete;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class WindowWaylandVulkan
|
||||
* @brief A Wayland window specialized for Vulkan rendering.
|
||||
*
|
||||
* This class extends the WindowWayland base class to support Vulkan graphics
|
||||
* integration within a Wayland environment. It provides methods for initializing
|
||||
* Vulkan command buffers and managing drawing operations either synchronously or asynchronously.
|
||||
*
|
||||
* The class exposes an event `onDraw` which is called for every frame.
|
||||
* @pre VulkanDevice::CreateDevice() must be called before creating or using this class.
|
||||
*/
|
||||
export class WindowWaylandVulkan : public WindowWayland {
|
||||
public:
|
||||
Event<VkCommandBuffer> onDraw;
|
||||
/**
|
||||
* @brief Constructs a WindowWaylandVulkan instance.
|
||||
*
|
||||
* @param name The title of the window.
|
||||
* @param width The width of the window in pixels.
|
||||
* @param height The height of the window in pixels.
|
||||
*/
|
||||
WindowWaylandVulkan(std::string name, std::uint32_t width, std::uint32_t height);
|
||||
/**
|
||||
* @brief Destructor for the WindowWaylandVulkan.
|
||||
*
|
||||
* Cleans up Vulkan and Wayland resources associated with this window.
|
||||
*/
|
||||
~WindowWaylandVulkan();
|
||||
/**
|
||||
* @brief Starts Vulkan initialization and returns a command buffer.
|
||||
*
|
||||
* This command buffer can be used to record Vulkan setup commands.
|
||||
*
|
||||
* @return VkCommandBuffer A Vulkan command buffer for recording initialization commands.
|
||||
*/
|
||||
VkCommandBuffer StartInit();
|
||||
/**
|
||||
* @brief Completes Vulkan initialization.
|
||||
*
|
||||
* Finalizes any remaining setup required after recording commands returned by StartInit().
|
||||
*/
|
||||
void FinishInit();
|
||||
/**
|
||||
* @brief Starts the event loop asynchronously.
|
||||
*
|
||||
* This method triggers rendering without blocking the caller.
|
||||
*/
|
||||
void StartAsync();
|
||||
/**
|
||||
* @brief Starts the event loop synchronously.
|
||||
*
|
||||
* This method blocks the caller until the event loop stops.
|
||||
*/
|
||||
void StartSync();
|
||||
private:
|
||||
void CreateSwapchain();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue