TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
vk_text_atlas_manager.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <vulkan/vulkan.h>
7
8namespace tachyon::vulkan
9{
12
14 class VulkanImageSet;
15
17 {
18 VkDescriptorImageInfo descriptorInfo {};
19 tachyon::Image* image { nullptr };
21 int32_t bpp { 0 };
23 bool used = false;
24 };
25
27 {
28 public:
29 std::vector<FontTexture> fontTextures;
32
33 public:
35
36 tachyon::TextureIndex CreateTexture(const uint8_t* imageData, tachyon::uint2 imageSize, uint8_t bpp) override;
37 void UpdateTexture(tachyon::TextureIndex textureIndex, const uint8_t* imageData, tachyon::uint2 imageSize) override;
38 void UpdateTextureRows(tachyon::TextureIndex textureIndex, const uint8_t* imageData, tachyon::uint2 imageSize,
39 uint32_t firstRow, uint32_t rowCount) override;
40
42 void SyncTextureIndices() override;
43 };
44
45}
A graphics backend: the device, the window contexts that render the GUI's windows,...
Definition gui_graphics_context.h:53
The images the shaders can sample, each at an ImageIndex. Implemented by the backend.
Definition gui_image.h:106
An image made by GraphicsContext::CreateImage; the backend defines its contents.
Definition gui_image.h:102
Definition gui_text_atlas_manager.h:17
The default graphics backend, on Vulkan 1.3.
Definition vk_graphics_context.h:46
Definition vk_image.h:38
Definition vk_text_atlas_manager.h:27
tachyon::vulkan::VulkanGraphicsContext * graphicsContext
Definition vk_text_atlas_manager.h:30
tachyon::ImageIndex GetImageIndex(tachyon::TextureIndex textureIndex) override
void UpdateTexture(tachyon::TextureIndex textureIndex, const uint8_t *imageData, tachyon::uint2 imageSize) override
void UpdateTextureRows(tachyon::TextureIndex textureIndex, const uint8_t *imageData, tachyon::uint2 imageSize, uint32_t firstRow, uint32_t rowCount) override
The page's pixels, all of them, of which only rows [firstRow, firstRow + rowCount) changed: where the...
std::vector< FontTexture > fontTextures
Definition vk_text_atlas_manager.h:29
tachyon::vulkan::VulkanImageSet * imageSet
Definition vk_text_atlas_manager.h:31
bool Initialize(tachyon::GraphicsContext *graphicsContext, tachyon::ImageSet *imageSet) override
tachyon::TextureIndex CreateTexture(const uint8_t *imageData, tachyon::uint2 imageSize, uint8_t bpp) override
ImageIndex
Index of an image in the graphics context's image set, as the shaders sample it.
Definition gui_image.h:99
@ Invalid
Definition gui_image.h:99
TextureIndex
Definition gui_text_atlas_manager.h:14
Definition vk_defaults.h:6
Definition gui_base_types.h:74
Definition vk_text_atlas_manager.h:17
tachyon::uint2 size
Definition vk_text_atlas_manager.h:20
VkDescriptorImageInfo descriptorInfo
Definition vk_text_atlas_manager.h:18
int32_t bpp
Definition vk_text_atlas_manager.h:21
tachyon::Image * image
Definition vk_text_atlas_manager.h:19
tachyon::ImageIndex imageIndex
Definition vk_text_atlas_manager.h:22
bool used
Definition vk_text_atlas_manager.h:23