모델 로더 완성

This commit is contained in:
2025-05-19 03:28:51 +09:00
parent 3a9dbcb470
commit 0ea46b288d
13 changed files with 148 additions and 55 deletions

View File

@@ -0,0 +1,9 @@
#pragma once
#include "vulkan/texture_handle.h"
namespace veng {
struct Material {
TextureHandle texture;
};
} // namespace veng

View File

@@ -0,0 +1,27 @@
#pragma once
#include <vector>
#include "material.h"
#include "vulkan/graphics.h"
#include "vulkan/vertex.h"
#include <memory>
namespace veng {
struct Model {
Model(std::shared_ptr<class Graphics> graphics);
~Model();
std::vector<veng::Vertex> vertices;
veng::BufferHandle vertex_buffer;
std::vector<std::uint32_t> indices;
veng::BufferHandle index_buffer;
glm::mat4 transform;
Material material;
private:
std::weak_ptr<class Graphics> graphics_;
};
} // namespace veng