|
TachyonUI 1.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 | |
| struct | tachyon::d3d12::D3D12SceneRender |
| What GraphicsContext::RenderScene's record gets on Direct3D 12 (ScenePayload::As): the window frame's command list with the scene's color and depth textures set as its render targets (color cleared to the scene's clear color, depth to 1), and the viewport and scissor set to all of it. More... | |
| struct | tachyon::d3d12::DebugConfig |
| Where the debug layer's messages go. More... | |
| struct | tachyon::d3d12::ExternalDevice |
| A host's device and queue, for the GUI to render on (SetExternalDevice) instead of making its own. More... | |
| class | tachyon::d3d12::D3D12GraphicsContext |
| 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... | |
| struct | tachyon::GpuInfo |
| A GPU as the graphics API reports it, for ChooseGpu. 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... | |
| struct | tachyon::UVRect |
| The part of an image to draw, in UV: 0,0 is its top-left corner and 1,1 its bottom-right. More... | |
| struct | tachyon::ImageDisplay |
| How an image is shown, in this order: 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... | |
| class | tachyon::ImageBatcher |
| class | tachyon::ImageSetTextAtlasManager< ImageSetT, ImageT > |
| 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::BoxPrimitive |
| struct | tachyon::GlyphPrimitive |
| struct | tachyon::DotPrimitive |
| struct | tachyon::LinePrimitive |
| struct | tachyon::TrianglePrimitive |
| struct | tachyon::QuadPrimitive |
| struct | tachyon::CirclePrimitive |
| 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::OccluderPrimitive |
| 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 |
| struct | tachyon::StyleBlend |
| A box's look as a mix of up to four of its state styles (flat GPU style indices, as GUIRenderer::StyleIndex gives them), each with its share; the shares add up to 1, the heaviest first. More... | |
| 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... | |
| struct | tachyon::metal::MetalSceneRender |
| What GraphicsContext::RenderScene's record gets on Metal (ScenePayload::As): the window frame's command buffer and a render command encoder on the scene's color and depth textures (color cleared to the scene's clear color, depth to 1), with the viewport set to all of it. More... | |
| struct | tachyon::metal::ExternalDevice |
| A host's device and queue, for the GUI to render on (SetExternalDevice) instead of making its own. More... | |
| class | tachyon::metal::MetalGraphicsContext |
| 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... | |
| struct | tachyon::sdlgpu::SDLGPUSceneRender |
| What GraphicsContext::RenderScene's record gets on SDL GPU (ScenePayload::As): the window frame's command buffer, outside any pass, and the scene's color and depth textures, cleared already (color to the scene's clear color, depth to 1). More... | |
| struct | tachyon::sdlgpu::DebugConfig |
| Where SDL GPU's messages go. More... | |
| class | tachyon::sdlgpu::SDLGPUGraphicsContext |
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 | |
| std::string_view | tachyon::GpuKindName (GpuKind kind) |
| The kind's name, as a preference names it: "integrated", "discrete", "virtual", "cpu", "other". | |
| std::optional< size_t > | tachyon::ChooseGpu (std::span< const GpuInfo > gpus, std::string_view preference) |
| Which of gpus preference asks for: | |
| std::string | tachyon::GpuPreference (std::string_view appPreference) |
| The GPU preference in effect: the TACHYON_GPU environment variable when it's set, for a run without changing code; else appPreference. | |
| 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 shaders' (all_common.slang: 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/d3d12/d3d12_graphics_context.h>
How serious a debug-layer message is.
| Enumerator | |
|---|---|
| Info | |
| Warning | |
| Error | |
|
strong |
#include <gui_core/graphics/gui_custom_draw_context.h>
The coordinate space a CustomDrawContext draws in.
|
strong |
#include <gui_core/graphics/gui_gpu_choice.h>
What kind of GPU a device is.
| Enumerator | |
|---|---|
| Other | |
| Integrated | |
| Discrete | |
| Virtual | |
| Cpu | |
|
strong |
#include <gui_core/graphics/gui_graphics_context.h>
When a deferred GPU resource destruction runs: Frame once the GPU has finished the frames that may use it, Application at Cleanup.
| Enumerator | |
|---|---|
| Frame | |
| Application | |
|
strong |
#include <gui_core/graphics/gui_image.h>
A channel of an image's pixel, or a constant, for ImageDisplay.
| Enumerator | |
|---|---|
| Red | |
| Green | |
| Blue | |
| Alpha | |
| Zero | |
| One | |
|
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.
|
strong |
#include <gui_core/graphics/sdlgpu/sdlgpu_graphics_context.h>
How serious a message from SDL GPU's debug mode is.
| Enumerator | |
|---|---|
| Info | |
| Warning | |
| Error | |
| std::string_view tachyon::GpuKindName | ( | GpuKind | kind | ) |
#include <gui_core/graphics/gui_gpu_choice.h>
The kind's name, as a preference names it: "integrated", "discrete", "virtual", "cpu", "other".
| std::optional< size_t > tachyon::ChooseGpu | ( | std::span< const GpuInfo > | gpus, |
| std::string_view | preference ) |
#include <gui_core/graphics/gui_gpu_choice.h>
Which of gpus preference asks for:
| std::string tachyon::GpuPreference | ( | std::string_view | appPreference | ) |
#include <gui_core/graphics/gui_gpu_choice.h>
The GPU preference in effect: the TACHYON_GPU environment variable when it's set, for a run without changing code; else appPreference.
|
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 shaders' (all_common.slang: 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.