public sealed class UiGeometryBuilderTurns a frame's draw list into the vertices a renderer submits.
Remarks
The last step that is still the interface's own. Everything below here is a pipeline, a buffer and a scissor; everything above is elements and styles. Being a pure function of a draw list is what lets the whole of it be tested without a device — the same argument the draw list itself makes about being testable without a window.
⚠ Boxes are one quad each, not a tessellated outline. A rounded rectangle and its border are both a signed distance the shader evaluates per pixel, so a corner is exact at any radius and costs four vertices — where tessellating one costs a vertex count that grows with the radius and is still faceted. That is also why the two share a batch kind: one shader draws both, with the thickness deciding whether the inside is filled.
⚠ Clips are resolved here rather than replayed. A draw list pushes and pops; a renderer sets a scissor. Carrying the resolved rectangle on each draw means the renderer never holds a stack, and cannot be caught out by a batch it skipped having left one behind.
⚠ This is also where a colour is brought into what the surface can show — see Gamut. It is the last stage that is still the interface's own and the first that knows which surface the picture is for, which makes it the only place the repair can sit: above it the draw list is deliberately device-independent, and below it the colour is already inside a UNORM attachment that has truncated it.
Fields and properties (17)
public int CachedPathsHow many distinct paths the tessellation cache is holding.
public IconAtlas? IconsThe icons this builder has drawn from the atlas, or null before it has drawn any.
public int RefusedFieldsHow many of the last frame's field paths the atlas could not take.
public int FieldPathsHow many of the last frame's paths were drawn as four vertices from the atlas.
public int TessellatedPathsHow many of the last frame's paths had to be tessellated rather than re-used.
public int CacheCapacityHow many paths the cache keeps before it drops the ones this frame did not use.
public int DroppedGlyphsHow many glyphs were dropped because the atlas could not hold them.
public bool AtlasChangedWhether the atlas changed while this frame's quads were being emitted.
public float ToleranceHow far a flattened curve may sit from the curve it replaces, in document pixels.
public float FringeHow far a path's antialiasing fringe reaches past its outline, in document pixels.
public ColorGamut GamutWhat the surface these vertices are for can show.
public float WhiteLevelWhat the interface's white is worth in the units the target is drawn in.
public int MappedColoursHow many of the last frame's colours were outside Gamut and repaired.
public int ColourSearchesHow many of those repairs had to run the binary search rather than be remembered.
public (int Version, Rectangle Extent) BuiltThe draw-list version and extent the geometry this builder holds was made from.
public int TessellationsHow many frames this builder has actually tessellated.
public int TessellationsSkippedHow many frames were answered with the vertices this builder already had.
Methods (3)
public bool TryBuild(DrawList list, GlyphFieldCache glyphs, Rectangle viewport, ref UiGeometry frame)Builds the geometry for a frame, or keeps the geometry it already has.
public UiGeometry Build(DrawList list, GlyphFieldCache glyphs, Rectangle viewport)Builds the geometry for a frame.
public static ulong LayerImage(int index)The number a composited group's surface is named by.
Used by (24)
- FillRuleTestsVixen.Ui.Testing.Tests
- GroupOpacityTestsVixen.Ui.Controls.Tests
- HudLuminanceDeviceTestsVixen.Graphics.Golden.Tests
- HudLuminanceTestsVixen.Ui.Controls.Tests
- IconAtlasTestsVixen.Ui.Tests
- IdleFrameWorkTestsVixen.Ui.Tests
- InterfaceInAWorldTestsVixen.Engine.Renderer.Tests
- MixBlendModeLuminanceTestsVixen.Ui.Controls.Tests
- NineSliceImageTestsVixen.Ui.Tests
- PathTessellationCacheTestsVixen.Ui.Tests
- UiBoxAgreementTestsVixen.Graphics.Golden.Tests
- UiCompositingTestsVixen.Graphics.Golden.Tests
- UiFrameLifetimeTestsVixen.Graphics.Golden.Tests
- UiGamutTestsVixen.Ui.Tests
- UiGeometryTestsVixen.Ui.Tests
- UiImageTestsVixen.Graphics.Golden.Tests
- UiImageViewTestsVixen.Graphics.Golden.Tests
- UiRavenAgreementTestsVixen.Graphics.Golden.Tests
- UiTestVixen.Ui.Testing
- UiTransformProjectiveTestsVixen.Ui.Tests
- UiWindowSurfaceVixen.Ui.Desktop
- VideoInUiTestsVixen.Video.Rendering.Tests
- EditorUiCompositingDeviceTestsVixen.Editor.App.Tests
- ThumbnailSurfaceDeviceTestsVixen.Editor.App.Tests