renamed model to mesh

This commit is contained in:
2026-09-08 22:48:59 -07:00
parent c211fffda1
commit 73d2121bc1
8 changed files with 41 additions and 42 deletions
+6 -6
View File
@@ -24,8 +24,8 @@ ModelRenderSystem::ModelRenderSystem(Device& device,
.setStage(ShaderStage::FRAGMENT)
.build();
auto bindingDescriptions = Model::Vertex::getBindingDescriptions();
auto attributeDescriptions = Model::Vertex::getAttributeDescriptions();
auto bindingDescriptions = Mesh::Vertex::getBindingDescriptions();
auto attributeDescriptions = Mesh::Vertex::getAttributeDescriptions();
this->graphicsPipeline =
GraphicsPipeline::Builder(device)
@@ -42,13 +42,13 @@ ModelRenderSystem::~ModelRenderSystem() {
}
void ModelRenderSystem::render(vk::CommandBuffer commandBuffer,
std::span<const std::unique_ptr<Model>> models,
std::span<const std::unique_ptr<Mesh>> meshes,
const FrameInfo& frameInfo) {
glm::mat4 viewProjection = frameInfo.camera.getViewProjection();
this->graphicsPipeline->bind(commandBuffer);
for (const std::unique_ptr<Model>& model : models) {
for (const std::unique_ptr<Mesh>& mesh : meshes) {
PushConstantData push{};
push.modelMatrix = viewProjection;
@@ -57,8 +57,8 @@ void ModelRenderSystem::render(vk::CommandBuffer commandBuffer,
vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment,
0, sizeof(PushConstantData), &push);
model->bind(commandBuffer);
model->draw(commandBuffer);
mesh->bind(commandBuffer);
mesh->draw(commandBuffer);
}
}