From 0efc2fc6e7aeba281b2718157439f3e43c23d61a Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Mon, 14 Jul 2025 15:00:52 -0300 Subject: fixt Improve graphics * src/blu_cat/gra/graphics_pipeline_2d_solid.cpp, src/blu_cat/gra/graphics_pipeline_2d_wired.cpp: remove redundant view port. * src/blu_cat/gra/renderer.cpp: Add view port to a more efficient place. Cleanup 2D images. --- src/blu_cat/gra/graphics_pipeline_2d_solid.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/blu_cat/gra/graphics_pipeline_2d_solid.cpp') diff --git a/src/blu_cat/gra/graphics_pipeline_2d_solid.cpp b/src/blu_cat/gra/graphics_pipeline_2d_solid.cpp index 05dcbe1..0d72fc9 100644 --- a/src/blu_cat/gra/graphics_pipeline_2d_solid.cpp +++ b/src/blu_cat/gra/graphics_pipeline_2d_solid.cpp @@ -238,25 +238,6 @@ GraphicsPipeline2DSolid::draw( const VkCommandBuffer draw_command_buffer, const size_t current_frame, const size_t next_frame, const uint32_t image_index) { - // TODO set viewport just once per view, not once per pipeline. - { // Set viewport - VkViewport vk_viewport{}; - vk_viewport.x = 0; - vk_viewport.y = 0; - vk_viewport.width = static_cast(BluCat::INT::core.display_width); - vk_viewport.height = static_cast(BluCat::INT::core.display_height); - 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 = 0; - vk_scissor.offset.y = 0; - vk_scissor.extent.width = BluCat::INT::core.display_width; - vk_scissor.extent.height = BluCat::INT::core.display_height; - vkCmdSetScissor(draw_command_buffer, 0, 1, &vk_scissor); - } - vkCmdBindPipeline( draw_command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, this->graphic_pipeline); -- cgit v1.2.3