Triangle posting
https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer Reached the above part of the tutorial. Adding IMGUI now before continuing.
This commit is contained in:
35
src/public/VulkanVertexBuffer.h
Normal file
35
src/public/VulkanVertexBuffer.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "Primitives.h"
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
struct FVertexBufferConfig
|
||||
{
|
||||
VkDevice Device;
|
||||
VkPhysicalDevice PhysicalDevice;
|
||||
};
|
||||
|
||||
class VulkanVertexBuffer
|
||||
{
|
||||
public:
|
||||
void Initialize(FVertexBufferConfig InConfig);
|
||||
|
||||
void Cleanup();
|
||||
|
||||
void CreateVertexBuffer(std::vector<Vertex> InVertices);
|
||||
|
||||
uint32_t FindMemoryType(uint32_t TypeFilter, VkMemoryPropertyFlags Properties);
|
||||
|
||||
VkBuffer GetVertexBuffer() { return VertexBuffer; }
|
||||
|
||||
private:
|
||||
FVertexBufferConfig Config;
|
||||
VkBuffer VertexBuffer;
|
||||
VkDeviceMemory VertexBufferMemory;
|
||||
};
|
||||
Reference in New Issue
Block a user