85 [[nodiscard]]
bool is_initialized()
const {
return m_shader_foundry !=
nullptr; }
100 const std::vector<vk::Format>& color_formats,
101 vk::Format depth_format = vk::Format::eUndefined);
122 void begin_rendering(
124 const std::shared_ptr<Core::Window>& window,
125 vk::Image swapchain_image,
126 const std::array<float, 4>& clear_color = { 0.0F, 0.0F, 0.0F, 1.0F });
133 void end_rendering(CommandBufferID cmd_id,
const std::shared_ptr<Core::Window>& window);
144 void bind_pipeline(CommandBufferID cmd_id, RenderPipelineID pipeline);
152 void bind_vertex_buffers(
153 CommandBufferID cmd_id,
154 const std::vector<std::shared_ptr<Buffers::VKBuffer>>& buffers,
155 uint32_t first_binding = 0);
163 void bind_index_buffer(
164 CommandBufferID cmd_id,
165 const std::shared_ptr<Buffers::VKBuffer>& buffer,
166 vk::IndexType index_type = vk::IndexType::eUint32);
174 void bind_descriptor_sets(
175 CommandBufferID cmd_id,
176 RenderPipelineID pipeline,
177 const std::vector<DescriptorSetID>& descriptor_sets);
187 CommandBufferID cmd_id,
188 RenderPipelineID pipeline,
201 CommandBufferID cmd_id,
202 uint32_t vertex_count,
203 uint32_t instance_count = 1,
204 uint32_t first_vertex = 0,
205 uint32_t first_instance = 0);
217 CommandBufferID cmd_id,
218 uint32_t index_count,
219 uint32_t instance_count = 1,
220 uint32_t first_index = 0,
221 int32_t vertex_offset = 0,
222 uint32_t first_instance = 0);
238 void register_window_for_rendering(
const std::shared_ptr<Core::Window>& window);
244 void unregister_window(
const std::shared_ptr<Core::Window>& window);
249 [[nodiscard]]
bool is_window_registered(
const std::shared_ptr<Core::Window>& window)
const;
254 [[nodiscard]] std::vector<std::shared_ptr<Core::Window>> get_registered_windows()
const;
265 std::vector<DescriptorSetID> allocate_pipeline_descriptors(RenderPipelineID pipeline);
270 vk::Image swapchain_image {};
275 std::shared_ptr<Core::VKGraphicsPipeline>
pipeline;
283 std::atomic<uint64_t> m_next_pipeline_id { 1 };
292 void cleanup_pipelines();
299 vk::ImageView get_current_image_view(
const std::shared_ptr<Core::Window>& window);