|
TachyonUI 0.1.0
High-performance UI for building tools.
|
The graphics backend interface, renderer, images and custom drawing. More...
Topics | |
| Vulkan backend | |
| The Vulkan graphics backend, and sharing a host's device and images. | |
Classes | |
| class | tachyon::Buffer |
| class | tachyon::CustomDrawContext |
| Passed to custom-draw callbacks (ElementStorage::AddCustomDraw / AddCustomDrawAfter): geometry lookups and drawing calls in a current space the callback switches with SetSpace or SetSpaceRaw, also between calls. More... | |
| class | tachyon::PostLayoutContext |
| Context for post-layout callbacks (AddPostLayout). More... | |
| class | tachyon::GraphicsContext |
| A graphics backend: the device, the window contexts that render the GUI's windows, and the images and text atlases they draw with. More... | |
| class | tachyon::Image |
| An image made by GraphicsContext::CreateImage; the backend defines its contents. More... | |
| class | tachyon::ImageSet |
| The images the shaders can sample, each at an ImageIndex. Implemented by the backend. More... | |
| struct | tachyon::PrimitiveRenderPass |
| One contiguous same-kind run of primitives, drawn with one call; or, with replay set, a cached scope's draw (its own passes), and the other fields unused. More... | |
| struct | tachyon::PrimitiveRenderTarget |
| class | tachyon::PrimitiveRenderer |
| struct | tachyon::glsl_float4 |
| struct | tachyon::Box |
| struct | tachyon::Glyph |
| struct | tachyon::Dot |
| struct | tachyon::Line |
| struct | tachyon::Triangle |
| struct | tachyon::Quad |
| struct | tachyon::Circle |
| A circle outline: the ring lineWidth wide around center at radius, its color and dashes running clockwise from the right (+x towards +y), as LineStyle sets them. More... | |
| struct | tachyon::Occluder |
| Depth only: marks pos/size as covered by opaque content drawn after it, so what was drawn before under it is skipped (its fragments fail the depth test early). More... | |
| struct | tachyon::PrimitiveSpec |
| struct | tachyon::GPUDrawPushConstants |
| struct | tachyon::LineStyle |
| class | tachyon::GUIRenderer |
| struct | tachyon::RHI::GpuPipeline |
| struct | tachyon::RHI::UploadRequest |
| class | tachyon::RHI::RenderDevice |
| Device-lifetime operations. More... | |
| class | tachyon::RHI::RenderCommandList |
| One frame's recording surface for one window. More... | |
| class | tachyon::NullGraphicsContext |
| A graphics backend that draws nothing: the UI is built, laid out and recorded as usual, but no GPU is used and windows stay empty. More... | |
Typedefs | |
| using | tachyon::PipelineSet = std::array<RHI::GpuPipeline, kPrimitiveKindCount> |
| using | tachyon::DeviceAddress = uint64_t |
| Shader-visible buffer address. | |
| using | tachyon::RHI::ResidentBufferId = uint64_t |
| GPU storage kept across frames (UploadResidentBuffers); 0 is none. | |
Functions | |
| int32_t | tachyon::SnapPx (float v) |
| Round half up, the same rule the box shader uses. | |
| IntRect | tachyon::SnapAbsolute (float4 px) |
| A box with no snapped parent: each edge to the nearest pixel. | |
| float4 | tachyon::PixelBounds (const float3x2 &toPixels, IntRect r) |
| The bounds of a rect mapped to window pixels, { x0, y0, x1, y1 }. | |
| IntRect | tachyon::SnapToParent (float4 parentPx, IntRect parentSnapped, float4 childPx) |
| A nested box: each edge keeps its rounded distance from the parent's snapped edge on the same side. | |
Variables | |
| constexpr float | tachyon::kPrimitiveDepthStep = 1.0f / float(1 << 22) |
| The depth between two primitives drawn one after the other; past the depth range all are at the nearest depth. | |
| constexpr size_t | tachyon::kPrimitiveKindCount = size_t(PrimitiveKind::Count) |
| constexpr PrimitiveSpec | tachyon::kPrimitiveSpecs [kPrimitiveKindCount] |
| Push-constant slot order matches the GLSL push block (box, glyph, dot, line, triangle). | |
The graphics backend interface, renderer, images and custom drawing.
| using tachyon::PipelineSet = std::array<RHI::GpuPipeline, kPrimitiveKindCount> |
#include <gui_core/graphics/gui_primitive_renderer.h>
| using tachyon::DeviceAddress = uint64_t |
#include <gui_core/graphics/gui_render_primitives.h>
Shader-visible buffer address.
uint64_t on every modern API (VkDeviceAddress / D3D12_GPU_VIRTUAL_ADDRESS / MTLGPUAddress).
| using tachyon::RHI::ResidentBufferId = uint64_t |
#include <gui_core/graphics/gui_rhi.h>
GPU storage kept across frames (UploadResidentBuffers); 0 is none.
|
strong |
#include <gui_core/graphics/gui_custom_draw_context.h>
The coordinate space a CustomDrawContext draws in.
|
strong |
#include <gui_core/graphics/gui_graphics_context.h>
When a deferred GPU resource destruction runs: Frame once the frames that may use it are done, Application at Cleanup.
| Enumerator | |
|---|---|
| Frame | |
| Application | |
|
strong |
#include <gui_core/graphics/gui_graphics_context.h>
The graphics API a backend presents with; window backends create their windows to match (SDL: SDL_WINDOW_VULKAN).
| Enumerator | |
|---|---|
| None | nothing is presented (NullGraphicsContext) |
| Vulkan | |
|
strong |
#include <gui_core/graphics/gui_image.h>
Pixel formats for GraphicsContext::CreateImage, 8 bits per channel.
The _SRGB formats decode sRGB to linear when sampled.
| Enumerator | |
|---|---|
| UNDEFINED | |
| R8 | |
| R8_SRGB | |
| R8G8 | |
| R8G8_SRGB | |
| R8G8B8 | |
| R8G8B8_SRGB | |
| R8G8B8A8 | |
| R8G8B8A8_SRGB | |
|
strong |
#include <gui_core/graphics/gui_image.h>
How an image is filtered and addressed when sampled.
| Enumerator | |
|---|---|
| UNDEFINED | |
| NearestRepeat | |
| LinearRepeat | |
| LinearClampToEdge | |
| enum tachyon::ImageIndex : uint32_t |
#include <gui_core/graphics/gui_image.h>
Index of an image in the graphics context's image set, as the shaders sample it.
Invalid (0) is no image.
| Enumerator | |
|---|---|
| Invalid | |
|
strong |
#include <gui_core/graphics/gui_render_primitives.h>
| Enumerator | |
|---|---|
| Box | |
| Glyph | |
| Dot | |
| Line | |
| Triangle | |
| Quad | |
| Circle | |
| Occluder | |
| Count | |
|
strong |
#include <gui_core/graphics/gui_render_primitives.h>
The vertices a primitive's vertex shader is run for; gl_VertexIndex divided by their count is the primitive, the remainder the corner.
| Enumerator | |
|---|---|
| Quad | 4 corners of its rectangle, drawn as two indexed triangles (0,1,3, 0,3,2) |
| Triangle | 3 corners of one triangle around its shape (clipped per fragment) |
|
strong |
#include <gui_core/graphics/gui_renderer.h>
A triangle's edges, for the ones drawn without a soft edge: where it meets another triangle of the same shape (a polygon's fan), so no seam shows between them.
| Enumerator | |
|---|---|
| None | |
| Edge01 | p0 to p1 |
| Edge12 | p1 to p2 |
| Edge20 | p2 to p0 |
|
strong |
#include <gui_core/graphics/gui_rhi.h>
Where a resident buffer is.
|
inline |
#include <gui_core/graphics/gui_pixel_snap.h>
Round half up, the same rule the box shader uses.
#include <gui_core/graphics/gui_pixel_snap.h>
A box with no snapped parent: each edge to the nearest pixel.
#include <gui_core/graphics/gui_pixel_snap.h>
The bounds of a rect mapped to window pixels, { x0, y0, x1, y1 }.
#include <gui_core/graphics/gui_pixel_snap.h>
A nested box: each edge keeps its rounded distance from the parent's snapped edge on the same side.
|
inlineconstexpr |
#include <gui_core/graphics/gui_render_primitives.h>
The depth between two primitives drawn one after the other; past the depth range all are at the nearest depth.
|
inlineconstexpr |
#include <gui_core/graphics/gui_render_primitives.h>
|
inlineconstexpr |
#include <gui_core/graphics/gui_render_primitives.h>
Push-constant slot order matches the GLSL push block (box, glyph, dot, line, triangle).
The block is exactly 128 bytes, with no room for more addresses, so Quad shares the Triangle slot, Circle the Line slot and Occluder the Box slot: each pass writes its own buffer address into its slot before drawing, and a draw call holds one kind.