Repository navigation
Ariadne: a shader: block is an implicit gl.scene.shaders - #909
Merged
Merged
Conversation
Each document under examples/ariadne/ now lists what it needs from the host. Scene documents require gl.scene, so ari (which has no scene adapter) refuses them with one error instead of dropping the scene: block with a warning. Documents that call stream, room, nav or quit verbs list those, and terminal_images marks raster.bitmap optional because half-block cells still show the picture. AriadneComponents.ShippedExamplesDeclareWhatTheyNeed loads every .ari under examples/ariadne and checks that each declares requires:, and that any document with a scene: requires gl.scene. docs/ARIADNE.md section 5.7 notes the convention. Not built or run on the authoring machine (no MSVC toolchain for the existing build dir).
gl.shaders read the backend's Capabilities::glsl, so it answered for the UI only. arigl --terminal renders the scene offscreen through GL, so a node's shader: block runs there, but the terminal backend reports glsl = false. A document could not tell "the scene runs my GLSL" from "nothing does". - SceneAdapter::runs_shaders() (default false): the adapter's renderer compiles the GLSL a document gives its scene. cvcGL's GlSceneAdapter and TerminalScene return true. - HostFacts::scene_shaders, set by AppRuntime from its adapter (Runtime::set_scene_shaders). - Tokens: gl.scene.shaders (the scene runs the document's GLSL), gl.ui.shaders (the UI draws GLSL itself, a shader_canvas: Capabilities::glsl), and gl.shaders now means both. arigl in a window has all three; arigl --terminal has gl.scene.shaders only; ari has none. - ari/arigl info: the token column is two wider, so the 16-character tokens line up. - Tests: the tokens over three host shapes, has? on the Runtime, an AppRuntime with a shader- running adapter and a terminal backend loading requires: of each token, and cvcgl_terminal_scene checks TerminalScene answers gl.scene.shaders but not gl.ui.shaders. - docs/ARIADNE.md 5.7 and the roadmap's 16.3 say which to require.
…ariadne/derive-scene-shaders
…nds it arigl --terminal registers stream_view through FtxuiBackend::register_widget, which only stored the draw fn. ImGuiBackend::register_widget also calls register_known_widget_type, which is what has_widget_type() (and so requires: and (has? ...)) reads. So conference_media.ari's requires: [stream_view] failed the load under --terminal (arigl_terminal_stream_view, every package job), though the widget draws there. The terminal backend now marks the type known too.
… 'origin/ariadne/scene-vs-ui-shaders' into ariadne/derive-scene-shaders
A scene node's shader: block needs a scene renderer that compiles the document's GLSL. On a host whose scene adapter does not (runs_shaders() false, the SceneAdapter default), the node used to draw unshaded with no word. The load preflight now warns once, naming the shaded nodes, unless the document lists gl.scene.shaders (or gl.shaders) itself: required, that fails the load; optional, it is the usual "optional requirement" warning. A host with no scene adapter already warns that the scene is ignored and gets nothing more. shader_canvas would carry gl.ui.shaders the same way; it is not a widget yet. lsystem_forest.ari, the one shipped example with shader: blocks (terrain bump, bark), lists gl.scene.shaders as optional: unshaded is still the island. ShippedExamplesDeclareWhatTheyNeed now checks that an example with a shader: block lists the token. Docs: ARIADNE.md 5.7, roadmap 16.3.
…quires # Conflicts: # src/cvc/tests/ariadne_loader_test.cpp
…e-shaders # Conflicts: # src/cvc/ariadne/app_runtime.cpp # src/cvc/tests/ariadne_loader_test.cpp
…ariadne/derive-scene-shaders
…e-shaders # Conflicts: # docs/roadmap/CVCGL-UI-DSL-ROADMAP.md # src/cvc/ariadne/app_runtime.cpp # src/cvc/tests/ariadne_requires_test.cpp
…e-shaders # Conflicts: # docs/ARIADNE.md # examples/ariadne/documents/lsystem_forest.ari # src/cvc/tests/ariadne_loader_test.cpp
This was referenced Nov 1, 2026
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.
#898 and #899 are merged; master is merged in, so the diff is only this change.
What
A scene node's
shader:block needs a renderer that compiles the document's GLSL (gl.scene.shaders, from #899). On a host whose scene adapter does not do that (SceneAdapter::runs_shaders()returns false by default), the node drew unshaded and nothing said so.AppRuntime::load's preflight now treats ashader:block as an implicitgl.scene.shaders(roadmap §7.6, §16.3):gl.scene.shaders(orgl.shaders), that entry decides instead. Required, the load fails. Optional, the load gives the usual "optional requirement" warning.shader_canvaswould carrygl.ui.shadersthe same way. It isn't a widget yet.lsystem_forest.ariis the one shipped example withshader:blocks (the terrain bump and bark presets). It lists{name: gl.scene.shaders, optional: true}, because the island still renders without them.ShippedExamplesDeclareWhatTheyNeednow checks that every example with ashader:block lists the token.Docs: ARIADNE.md §5.7, roadmap §16.3.
Tests
AriadneRequires.AShaderBlockOnASceneWithoutShadersWarnscovers:AriadneComponents.ShippedExamplesDeclareWhatTheyNeedhas the new shader check.