initial commit

This commit is contained in:
2024-04-06 14:11:26 +02:00
commit 1d44ecc0ee
85 changed files with 11573 additions and 0 deletions

41
include/iwa/command.hpp Normal file
View File

@@ -0,0 +1,41 @@
#pragma once
#if !defined(IWA_COMMAND_HPP_INCLUDED)
#define IWA_COMMAND_HPP_INCLUDED
#include "iwa/object.hpp"
#include "iwa/vkwrapper.hpp"
namespace iwa
{
struct CommandPoolCreationArgs
{
vk::CommandPoolCreateFlags flags;
std::uint32_t queueFamilyIndex;
};
struct CommandBufferAllocateArgs
{
vk::CommandBufferLevel level = vk::CommandBufferLevel::ePrimary;
};
class CommandPool : public Object<CommandPool, BaseObject, class Device>, public MixinVulkanObject<vk::CommandPool>
{
public:
CommandPool(ObjectPtr<class Device> owner, CommandPoolCreationArgs args);
~CommandPool() noexcept override;
[[nodiscard]] ObjectPtr<class CommandBuffer> allocateCommandBuffer(const CommandBufferAllocateArgs& args = {});
// [[nodiscard]] std::vector<vk::CommandBuffer> allocateCommandBuffers(std::size_t count, const CommandBufferAllocateArgs& args = {}) const noexcept;
};
class CommandBuffer : public Object<CommandBuffer, BaseObject, CommandPool>, public MixinVulkanObject<vk::CommandBuffer>
{
public:
CommandBuffer(ObjectPtr<CommandPool> owner, vk::CommandBuffer handle);
~CommandBuffer() noexcept override;
};
} // namespace iwa
#endif // !defined(IWA_COMMAND_HPP_INCLUDED)