forked from erickpiva/VulkanRenderer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMesh.h
41 lines (28 loc) · 974 Bytes
/
Mesh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <vector>
#include "Utilities.h"
class Mesh
{
public:
Mesh();
~Mesh();
Mesh(VkPhysicalDevice NewPhysicalDevice, VkDevice NewDevice, VkQueue TransferQueue, VkCommandPool TransferCommandPool, std::vector<Vertex>* Vertices, std::vector<uint32_t>* Indices);
void DestroyMeshBuffers();
int GetVertexCount();
VkBuffer GetVertexBuffer();
int GetIndexCount();
VkBuffer GetIndexBuffer();
private:
int VertexCount;
VkBuffer VertexBuffer;
VkDeviceMemory VertexBufferMemory;
int IndexCount;
VkBuffer IndexBuffer;
VkDeviceMemory IndexBufferMemory;
VkPhysicalDevice PhysicalDevice;
VkDevice Device;
void CreateVertexBuffer(VkQueue TransferQueue, VkCommandPool TransferCommandPool, std::vector<Vertex>* Vertices);
void CreateIndexBuffer(VkQueue TransferQueue, VkCommandPool TransferCommandPool, std::vector<uint32_t>* Indices);
};