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:
2026-02-17 18:37:38 -05:00
parent ab28c22446
commit 11ac560009
41 changed files with 1961 additions and 999 deletions

View 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;
};