You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
591 B
29 lines
591 B
2 weeks ago
|
#pragma once
|
||
|
|
||
|
#include <vulkan/vulkan_core.h>
|
||
|
#include <stdexcept>
|
||
2 weeks ago
|
#include "vertex.hpp"
|
||
|
|
||
|
const std::vector<uint32_t> indices = {
|
||
2 weeks ago
|
0, 1, 2, 0, 3, 1,
|
||
|
4, 5, 6, 4, 7, 5
|
||
2 weeks ago
|
};
|
||
2 weeks ago
|
|
||
|
class Instance;
|
||
2 weeks ago
|
class CommandPool;
|
||
2 weeks ago
|
|
||
|
class Buffer {
|
||
|
public:
|
||
2 weeks ago
|
explicit Buffer(VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags properties);
|
||
2 weeks ago
|
~Buffer();
|
||
2 weeks ago
|
VkBuffer handle = VK_NULL_HANDLE;
|
||
|
VkDeviceMemory memory = VK_NULL_HANDLE;
|
||
|
VkDeviceSize size;
|
||
|
|
||
2 weeks ago
|
static Buffer* createStagedVertexBuffer();
|
||
|
static Buffer* createStagedIndexBuffer();
|
||
2 weeks ago
|
|
||
|
void copyTo(Buffer* dst, CommandPool* commandPool);
|
||
2 weeks ago
|
|
||
|
private:
|
||
|
};
|