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);
116 [[nodiscard]] vk::DescriptorSetLayout get_view_transform_layout(
134 void begin_rendering(
136 const std::shared_ptr<Core::Window>& window,
137 vk::Image swapchain_image,
138 const std::array<float, 4>& clear_color = default_color,
139 vk::ImageView depth_image_view =
nullptr);
146 void end_rendering(
CommandBufferID cmd_id,
const std::shared_ptr<Core::Window>& window);
165 void bind_vertex_buffers(
167 const std::vector<std::shared_ptr<Buffers::VKBuffer>>& buffers,
168 uint32_t first_binding = 0);
176 void bind_index_buffer(
178 const std::shared_ptr<Buffers::VKBuffer>& buffer,
179 vk::IndexType index_type = vk::IndexType::eUint32);
188 void bind_descriptor_sets(
191 const std::vector<DescriptorSetID>& descriptor_sets,
192 uint32_t first_set = 0);
207 uint32_t offset = 0);
219 uint32_t vertex_count,
220 uint32_t instance_count = 1,
221 uint32_t first_vertex = 0,
222 uint32_t first_instance = 0);
235 uint32_t index_count,
236 uint32_t instance_count = 1,
237 uint32_t first_index = 0,
238 int32_t vertex_offset = 0,
239 uint32_t first_instance = 0);
244 void draw_mesh_tasks(
246 uint32_t group_count_x,
247 uint32_t group_count_y = 1,
248 uint32_t group_count_z = 1);
253 void draw_mesh_tasks_indirect(
255 const std::shared_ptr<Buffers::VKBuffer>& buffer,
256 vk::DeviceSize offset = 0,
257 uint32_t draw_count = 1,
258 uint32_t stride =
sizeof(VkDrawMeshTasksIndirectCommandEXT));
274 void register_window_for_rendering(
const std::shared_ptr<Core::Window>& window);
280 void unregister_window(
const std::shared_ptr<Core::Window>& window);
285 [[nodiscard]]
bool is_window_registered(
const std::shared_ptr<Core::Window>& window)
const;
290 [[nodiscard]] std::vector<std::shared_ptr<Core::Window>> get_registered_windows()
const;
302 std::vector<DescriptorSetID> allocate_pipeline_descriptors(
304 uint32_t first_layout_index = 0);
309 vk::Image swapchain_image {};
314 std::shared_ptr<Core::VKGraphicsPipeline>
pipeline;
317 vk::ShaderStageFlags push_constant_stages = vk::ShaderStageFlagBits::eVertex
318 | vk::ShaderStageFlagBits::eFragment;
319 vk::DescriptorSetLayout view_transform_layout {};
325 std::atomic<uint64_t> m_next_pipeline_id { 1 };
334 void cleanup_pipelines();
341 vk::ImageView get_current_image_view(
const std::shared_ptr<Core::Window>& window);