|
|
gfx_device const & | device |
| |
|
vk::ShaderModule | vertexShaderModule |
| |
|
vk::ShaderModule | fragmentShaderModule |
| |
|
specialization_constants | specializationConstants |
| |
|
std::vector< vk::SpecializationMapEntry > | fragmentShaderSpecializationMapEntries |
| |
|
vk::SpecializationInfo | fragmentShaderSpecializationInfo |
| |
|
std::vector< vk::PipelineShaderStageCreateInfo > | shaderStages |
| |
|
texture_map | stagingTexture |
| |
|
std::vector< texture_map > | atlasTextures |
| |
|
std::array< vk::DescriptorImageInfo, atlasMaximumNrImages > | atlasDescriptorImageInfos |
| |
|
vk::Sampler | atlasSampler |
| |
|
vk::DescriptorImageInfo | atlasSamplerDescriptorImageInfo |
| |
|
point3 | atlas_allocation_position = {} |
| |
| int | atlasAllocationMaxHeight = 0 |
| | During allocation on a row, we keep track of the tallest glyph.
|
| |
◆ allocate_rect()
| glyph_atlas_info hi::v1::gfx_pipeline_SDF::device_shared::allocate_rect |
( |
extent2 | draw_extent, |
|
|
scale2 | draw_scale ) |
|
inlinenoexcept |
Allocate an glyph in the atlas.
This may allocate an atlas texture, up to atlasMaximumNrImages.
◆ destroy()
| void hi::v1::gfx_pipeline_SDF::device_shared::destroy |
( |
gfx_device const * | vulkanDevice | ) |
|
|
inline |
Deallocate vulkan resources. This is called in the destructor of gfx_device, therefor we can not use our gfx_device from this point on.
◆ place_vertices()
Place vertices for a single glyph.
- Parameters
-
| vertices | The list of vertices to add to. |
| clipping_rectangle | The rectangle to clip the glyph. |
| box | The rectangle of the glyph in window coordinates. The box's size must be the size of the glyph's bounding box times glyph_size. |
| glyphs | The font-id, composed-glyphs to render |
| colors | The color of each corner of the glyph. |
- Returns
- True is atlas was updated.
◆ prepare_atlas_for_rendering()
| void hi::v1::gfx_pipeline_SDF::device_shared::prepare_atlas_for_rendering |
( |
| ) |
|
|
inline |
This will transition the atlas to 'shader-read'.
◆ prepareStagingPixmapForDrawing()
| void hi::v1::gfx_pipeline_SDF::device_shared::prepareStagingPixmapForDrawing |
( |
| ) |
|
|
inline |
This will transition the staging texture to 'general' for writing by the CPU.
◆ uploadStagingPixmapToAtlas()
| void hi::v1::gfx_pipeline_SDF::device_shared::uploadStagingPixmapToAtlas |
( |
glyph_atlas_info const & | location | ) |
|
|
inline |
Once drawing in the staging pixmap is completed, you can upload it to the atlas.
This will transition the stating texture to 'source' and the atlas to 'destination'.
◆ atlasAllocationMaxHeight
| int hi::v1::gfx_pipeline_SDF::device_shared::atlasAllocationMaxHeight = 0 |
During allocation on a row, we keep track of the tallest glyph.
The documentation for this struct was generated from the following files: