|
HikoGUI
A low latency retained GUI
|
Public Member Functions | |
| device_shared (gfx_device_vulkan const &device) | |
| device_shared (device_shared const &)=delete | |
| device_shared & | operator= (device_shared const &)=delete |
| device_shared (device_shared &&)=delete | |
| device_shared & | operator= (device_shared &&)=delete |
| void | destroy (gfx_device_vulkan const *vulkanDevice) |
| std::vector< std::size_t > | allocate_pages (std::size_t num_pages) noexcept |
| Allocate pages from the atlas. | |
| void | free_pages (std::vector< std::size_t > const &pages) noexcept |
| Deallocate pages back to the atlas. | |
| void | draw_in_command_buffer (vk::CommandBuffer const &commandBuffer) |
| hi::pixmap_span< sfloat_rgba16 > | get_staging_pixmap () |
| Get the full staging pixel map excluding border. | |
| void | prepare_atlas_for_rendering () |
| Prepare the atlas so that it can be used as a texture map by the shaders. | |
| 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. | |
Data Fields | |
| gfx_device_vulkan const & | device |
| vk::ShaderModule | vertex_shader_module |
| vk::ShaderModule | fragment_shader_module |
| std::vector< vk::PipelineShaderStageCreateInfo > | shader_stages |
| texture_map | staging_texture |
| std::vector< texture_map > | atlas_textures |
| std::array< vk::DescriptorImageInfo, atlas_maximum_num_images > | atlas_descriptor_image_infos |
| vk::Sampler | atlas_sampler |
| vk::DescriptorImageInfo | atlas_sampler_descriptor_image_info |
Static Public Attributes | |
| static constexpr std::size_t | atlas_num_pages_per_axis = 8 |
| static constexpr std::size_t | atlas_num_pages_per_image = atlas_num_pages_per_axis * atlas_num_pages_per_axis |
| static constexpr std::size_t | atlas_image_axis_size = atlas_num_pages_per_axis * (paged_image::page_size + 2) |
| static constexpr std::size_t | atlas_maximum_num_images = 64 |
| static constexpr std::size_t | staging_image_width = 1024 |
| static constexpr std::size_t | staging_image_height = 1024 |
|
noexcept |
Allocate pages from the atlas.
| void v1::pipeline_image::device_shared::destroy | ( | gfx_device_vulkan const * | vulkanDevice | ) |
Deallocate vulkan resources. This is called in the destructor of gfx_device_vulkan, therefor we can not use our std::weak_ptr<gfx_device_vulkan> device.
|
noexcept |
Deallocate pages back to the atlas.
| hi::pixmap_span< sfloat_rgba16 > v1::pipeline_image::device_shared::get_staging_pixmap | ( | ) |
Get the full staging pixel map excluding border.
The returned pixel-map is offset by the page::border.
|
noexcept |
Place vertices for a single image.
| vertices | The list of vertices to add to. |
| clipping_rectangle | The rectangle to clip the glyph. |
| box | The rectangle of the image in window coordinates. |
| image | The image to render. |
| void v1::pipeline_image::device_shared::prepare_atlas_for_rendering | ( | ) |
Prepare the atlas so that it can be used as a texture map by the shaders.