87 [[nodiscard]]
bool is_initialized()
const {
return m_shader_foundry !=
nullptr; }
102 const std::vector<vk::Format>& color_formats,
103 vk::Format depth_format = vk::Format::eUndefined);
126 void begin_rendering(
128 const std::shared_ptr<Core::Window>& window,
129 vk::Image swapchain_image,
130 const std::array<float, 4>& clear_color = default_color,
131 vk::ImageView depth_image_view =
nullptr);
138 void end_rendering(
CommandBufferID cmd_id,
const std::shared_ptr<Core::Window>& window);
157 void bind_vertex_buffers(
159 const std::vector<std::shared_ptr<Buffers::VKBuffer>>& buffers,
160 uint32_t first_binding = 0);
168 void bind_index_buffer(
170 const std::shared_ptr<Buffers::VKBuffer>& buffer,
171 vk::IndexType index_type = vk::IndexType::eUint32);
179 void bind_descriptor_sets(
182 const std::vector<DescriptorSetID>& descriptor_sets);
207 uint32_t vertex_count,
208 uint32_t instance_count = 1,
209 uint32_t first_vertex = 0,
210 uint32_t first_instance = 0);
223 uint32_t index_count,
224 uint32_t instance_count = 1,
225 uint32_t first_index = 0,
226 int32_t vertex_offset = 0,
227 uint32_t first_instance = 0);
232 void draw_mesh_tasks(
234 uint32_t group_count_x,
235 uint32_t group_count_y = 1,
236 uint32_t group_count_z = 1);
241 void draw_mesh_tasks_indirect(
243 const std::shared_ptr<Buffers::VKBuffer>& buffer,
244 vk::DeviceSize offset = 0,
245 uint32_t draw_count = 1,
246 uint32_t stride =
sizeof(VkDrawMeshTasksIndirectCommandEXT));
262 void register_window_for_rendering(
const std::shared_ptr<Core::Window>& window);
268 void unregister_window(
const std::shared_ptr<Core::Window>& window);
273 [[nodiscard]]
bool is_window_registered(
const std::shared_ptr<Core::Window>& window)
const;
278 [[nodiscard]] std::vector<std::shared_ptr<Core::Window>> get_registered_windows()
const;
289 std::vector<DescriptorSetID> allocate_pipeline_descriptors(
RenderPipelineID pipeline);
294 vk::Image swapchain_image {};
299 std::shared_ptr<Core::VKGraphicsPipeline>
pipeline;
302 vk::ShaderStageFlags push_constant_stages = vk::ShaderStageFlagBits::eVertex
303 | vk::ShaderStageFlagBits::eFragment;
309 std::atomic<uint64_t> m_next_pipeline_id { 1 };
318 void cleanup_pipelines();
325 vk::ImageView get_current_image_view(
const std::shared_ptr<Core::Window>& window);