diff options
author | Frederico Linhares <fred@linhares.blue> | 2025-07-14 15:00:52 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2025-07-14 15:00:52 -0300 |
commit | 0efc2fc6e7aeba281b2718157439f3e43c23d61a (patch) | |
tree | 80060f7ea35d80ce2e71240e029ee50e2f94c2bc /src/blu_cat/gra/graphics_pipeline_2d_wired.cpp | |
parent | 8bedf8a366cb6c1179bc89678c863517b9356d48 (diff) |
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.
Diffstat (limited to 'src/blu_cat/gra/graphics_pipeline_2d_wired.cpp')
-rw-r--r-- | src/blu_cat/gra/graphics_pipeline_2d_wired.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/blu_cat/gra/graphics_pipeline_2d_wired.cpp b/src/blu_cat/gra/graphics_pipeline_2d_wired.cpp index 1273c67..209dafd 100644 --- a/src/blu_cat/gra/graphics_pipeline_2d_wired.cpp +++ b/src/blu_cat/gra/graphics_pipeline_2d_wired.cpp @@ -250,24 +250,6 @@ GraphicsPipeline2DWired::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<float>(BluCat::INT::core.display_width); - vk_viewport.height = static_cast<float>(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); - } // Draw rectangles { |