UIPass class
#include <Runtime/Rendering/Public/UIPass.h>
Public types
Public functions
- auto Initialize(const VulkanContext& context, VulkanMemory& memory, const TextureTable& textures, VkFormat colorFormat, uint32_t framesInFlight) -> bool
colorFormatis the format of every target this pass draws into.- void Shutdown()
- auto IsReady() const -> bool
-
void Record(VkCommandBuffer cmd,
const GGUI::
GGSnapshot& snapshot, uint64_t surface, uint32_t frameIndex, VkExtent2D extent, Part part = Part::All) - void SetGlyphPages(const uint16_t* textures, uint32_t count, uint64_t generation)
- void ReleaseSurface(uint64_t surface)
- The surface is gone: free its buffers. Call once nothing in flight uses them.
- auto GetStats() const -> Stats
- Any thread.
Enum documentation
enum class UIPass:: Part: uint8_t
Which part of a document to draw: something else can be drawn between its nodes and what is over them (scroll bars, carets, popups).
Function documentation
void UIPass:: Record(VkCommandBuffer cmd,
const GGUI:: GGSnapshot& snapshot,
uint64_t surface,
uint32_t frameIndex,
VkExtent2D extent,
Part part = Part::All)
Draw snapshot into the open rendering scope. surface identifies whose buffers to use (a window ID); frameIndex is the frame-in-flight slot being recorded, whose previous use the GPU has finished. extent is the target's size in pixels.
void UIPass:: SetGlyphPages(const uint16_t* textures,
uint32_t count,
uint64_t generation)
Which texture each glyph atlas page is in. A glyph primitive names a page; the texture it is in is filled in as primitives are uploaded. generation changes whenever the mapping does, so buffers holding the old textures are rewritten. The array must outlive the pass's use of it.