24 static constexpr std::size_t atlas_num_pages_per_axis = 8;
25 static constexpr std::size_t atlas_num_pages_per_image = atlas_num_pages_per_axis * atlas_num_pages_per_axis;
26 static constexpr std::size_t atlas_image_axis_size = atlas_num_pages_per_axis * (paged_image::page_size + 2);
27 static constexpr std::size_t atlas_maximum_num_images = 64;
28 static constexpr std::size_t staging_image_width = 1024;
29 static constexpr std::size_t staging_image_height = 1024;
33 vk::ShaderModule vertex_shader_module;
34 vk::ShaderModule fragment_shader_module;
41 vk::Sampler atlas_sampler;
42 vk::DescriptorImageInfo atlas_sampler_descriptor_image_info;
47 device_shared(device_shared
const &) =
delete;
48 device_shared &operator=(device_shared
const &) =
delete;
49 device_shared(device_shared &&) =
delete;
50 device_shared &operator=(device_shared &&) =
delete;
66 void draw_in_command_buffer(vk::CommandBuffer
const &commandBuffer);
88 aarectangle
const &clipping_rectangle,
90 paged_image
const &image)
noexcept;
106 void make_staging_border_transparent(aarectangle border_rectangle)
noexcept;
113 void clear_staging_between_border_and_upload(aarectangle border_rectangle, aarectangle upload_rectangle)
noexcept;
125 void prepare_staging_for_upload(
paged_image const &image)
noexcept;
129 void update_atlas_with_staging_pixmap(
paged_image const &image)
noexcept;
131 void build_shaders();
133 void add_atlas_image();
void place_vertices(vector_span< vertex > &vertices, aarectangle const &clipping_rectangle, quad const &box, paged_image const &image) noexcept
Place vertices for a single image.