summaryrefslogtreecommitdiff
path: root/src/vk/graphics_pipeline_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vk/graphics_pipeline_3d.cpp')
-rw-r--r--src/vk/graphics_pipeline_3d.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp
index 2b6812d..2a1fec1 100644
--- a/src/vk/graphics_pipeline_3d.cpp
+++ b/src/vk/graphics_pipeline_3d.cpp
@@ -259,24 +259,6 @@ GraphicsPipeline3D::draw(
std::shared_ptr<View3D> view, const VkCommandBuffer draw_command_buffer,
const size_t current_frame, const uint32_t image_index)
{
- { // Set viewport
- VkViewport vk_viewport{};
- vk_viewport.x = view->region.x;
- vk_viewport.y = view->region.y;
- vk_viewport.width = view->region.z;
- vk_viewport.height = view->region.w;
- vk_viewport.minDepth = 0.0f;
- vk_viewport.maxDepth = 1.0f;
- vkCmdSetViewport(draw_command_buffer, 0, 1, &vk_viewport);
-
- VkRect2D vk_scissor{};
- vk_scissor.offset.x = static_cast<int32_t>(view->region.x);
- vk_scissor.offset.y = static_cast<int32_t>(view->region.y);
- vk_scissor.extent.width = static_cast<uint32_t>(view->region.z);
- vk_scissor.extent.height = static_cast<uint32_t>(view->region.w);
- vkCmdSetScissor(draw_command_buffer, 0, 1, &vk_scissor);
- }
-
vkCmdBindPipeline(
draw_command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
this->graphic_pipeline);
@@ -320,25 +302,6 @@ GraphicsPipeline3D::draw(
instance->uniform_buffers[image_index].copy_data(&udo_static_model);
}
}
-
- { // Update view uniform buffers
- VK::UDOView3D ubo_view_3d{};
-
- // View matrix.
- glm::mat4 translation_matrix{1.0f};
- translation_matrix = glm::translate(
- translation_matrix, *view->camera_position);
- glm::mat4 rotation_matrix{glm::toMat4(*view->camera_orientation)};
- ubo_view_3d.view = glm::inverse(translation_matrix * rotation_matrix);
-
- // Projection matrix.
- ubo_view_3d.proj = glm::perspective(
- glm::radians(view->field_of_view),
- view->region.z / view->region.w,
- 0.1f, 100.0f);
-
- view->ub_3d[image_index].copy_data(&ubo_view_3d);
- }
}
}