Repository navigation
Ariadne scene: label: on any node, and entity_labels: for world entities - #1234
Merged
Merged
Conversation
A scene node's `label:` draws text over the node in screen space, such as a vehicle's name tag.
It is offset above the node, faded and culled by the camera's distance, on a backdrop with an
edge, at a per-label scale, with nearer labels over farther ones. `scene: entity_labels:` gives
each world entity (WorldVehicles) its name as a label in the same keys.
- cvcGL LabelLayerNode (LabelLayer.h): one node per scene draws its labels in the overlay pass,
through 2-D text actors no renderer holds, so mirror viewports copy its prop like any other.
Each draw, per renderer:
- the anchor comes from the node's world transform (top or centre of its bounds, or its
origin) plus the offset;
- a hidden node, or one the renderer leaves out (a view's tags), has no label there;
- fade and cull go by that renderer's camera distance (label_fade);
- labels are drawn farthest first.
Bound keys (text, scale, focus) are read at draw time; nothing is written to state. Text is
rasterised again only when its text, size or opacity (32 steps) changes.
- label: { text | bind, offset, anchor, color, backdrop, backdrop_opacity, edge, edge_width,
size, scale, focus: { key, value, scale }, fade: [near, far], bold } (or label: <text>).
realize_scene applies it in its shared tail (scene_labels.h), so custom types and data nodes
get one too.
- entity_labels: (Scene, RealizedScene): sync_vehicle_markers labels each entity's node
(vehicle_<id>). The text fills {name}, {id}, {archetype} and {team}; an unnamed entity shows
its node's id.
Test cvcgl_ariadne_labels (rendered for real) covers:
- the fade rule and the cull past far;
- red text on a blue backdrop in a green edge, above its node;
- depth order;
- bound text, scale and focus;
- hidden nodes, and a renderer that leaves a node out;
- labels following a moved node;
- no rasterising on a still frame;
- entity labels, directly and through a spawned, named world entity (Jolt builds).
Documented in docs/ARIADNE.md §5.4.
transfix
enabled auto-merge (squash)
November 14, 2026 19:32
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
Master's #1217 keeps nothing per thread in state_exec: a native's context (call_args::context()) carries its group, registry and stream, async_host::call and begin_external take it, and the pool drops in_pump_all() and the one-argument run_on_host. - async_host.h: begin_external takes the context, as on master, and keeps this branch's note that a call is finished through the host it was made on. - script_engine.cpp: the sliced form finds the calling program's group from the call's context (exec_group::current(ctx)), else group 0, and reads its data step from the context. - ariadne.cpp: file-pick opens its picker through run_on_host for the group its verbs were bound for (the env's, as its host is), and inline in group 0 and the init lane. - exec_pool: in_pump_all() is back, for the host-thread calls' debug assertion and ScriptLane::run's refusal, read from the pool's calls (their callers' and pumpers' thread ids) under its mutex rather than from thread-locals. - ariadne_runtime_test: the init lane's cycles test no longer compares against the calling thread's own registry, which master removed; it is AriadneInit.RunsAScriptThatLeavesCycles. - ci.yml: the sanitizer's required list names the test by its new name. - STATE_EXEC_THREADED.md: B29-B31 and the file-pick and sliced-call notes name the context-based calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Any scene node can now carry a screen-space label: text over the node, such as a vehicle's name tag. World entities can get their names as labels too. Documented in docs/ARIADNE.md §5.21, a section of its own (so it does not collide with #1232's §5.4 addition).
How labels are drawn
cvc::gl::LabelLayerNode(LabelLayer.h) draws all of a scene's labels. Its prop draws in the overlay pass through 2-D text actors that no renderer holds, so mirror viewports, which skip 2-D actors, still copy it.offset:;tags:);bind:,scale:,focus:) are read at draw time.entity_labels:labels each world entity's node (vehicle_<id>) as it is drawn. The text fills in{name},{id},{archetype}and{team}; an unnamed entity shows its node's id.show_label/label_text) is unchanged.What changed
LabelLayer.{h,cpp}(cvcGL), andscene_labels.{h,cpp}(Ariadne) forlabel:andentity_labels:.realize_sceneapplies a node'slabel:in its shared tail, so custom types and data nodes get one too.Scene::entity_labelsandRealizedScene::entity_labelsare new. The loader readsscene: entity_labels:, andsync_vehicle_markerslabels each entity's node.Tests
New
cvcgl_ariadne_labels(rendered for real; it skips where nothing rasterises unlessCVC_REQUIRE_RENDER=1) covers:far;scale:andfocus:, following the key each frame;Run locally on Linux (GCC 13, Release, Mesa, Jolt) with
CVC_REQUIRE_RENDER=1; all pass:cvcgl_ariadne_labels, 37/37, including the spawned entity labelled "Alpha Refactor & Modernize code #1";cvcgl_ariadne_{physics,data,pick,realize,scenes,views};cvcgl_ari_switch,cvcgl_camera_idle,cvcgl_shadow_castersandcvcgl_stream_node;ariadne_loader_test(230 tests).Not run locally: Windows, macOS and the wasm lanes (CI covers them).