renamed model to mesh
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user