Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/mesh.h
2018-11-06 09:08:55 -05:00

31 lines
542 B
C++

#pragma once
#include <vector>
#include <string>
#include <cstdint>
#include <glm/glm.hpp>
#include <vulkan/vulkan.h>
class Material;
struct Vertex {
glm::vec3 position, normal;
glm::vec2 uv;
};
class Mesh {
public:
std::string name;
glm::vec3 position;
Material* material = nullptr;
std::vector<Vertex> vertices;
std::vector<uint32_t> indices;
VkBuffer vertexBuffer = nullptr;
VkDeviceMemory vertexMemory = nullptr;
VkBuffer indexBuffer = nullptr;
VkDeviceMemory indexMemory = nullptr;
};