xbintsc 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli/help.d.ts +1 -1
- package/dist/src/cli/help.js +1 -1
- package/dist/src/codegen/generator/calls/invocation.js +6 -4
- package/dist/src/codegen/generator/calls/invocation.js.map +1 -1
- package/dist/src/codegen/generator/context.d.ts +4 -3
- package/dist/src/codegen/generator/context.js +6 -5
- package/dist/src/codegen/generator/context.js.map +1 -1
- package/dist/src/codegen/generator/expressions/assignment.js +3 -3
- package/dist/src/driver/config.d.ts +1 -1
- package/dist/src/driver/options.d.ts +1 -1
- package/dist/src/driver/version.d.ts +1 -1
- package/dist/src/driver/version.js +1 -1
- package/dist/src/extensions/gui/features.d.ts +14 -6
- package/dist/src/extensions/gui/features.js +34 -6
- package/dist/src/extensions/gui/features.js.map +1 -1
- package/dist/src/extensions/gui/index.js +3 -3
- package/dist/tests/codegen/llvm.test.js +1 -1
- package/dist/tests/e2e/gui-audio.test.js +24 -0
- package/dist/tests/e2e/gui-audio.test.js.map +1 -1
- package/dist/tests/e2e/gui-draw-perf.test.js +9 -0
- package/dist/tests/e2e/gui-draw-perf.test.js.map +1 -1
- package/dist/tests/e2e/gui-font-face.test.d.ts +3 -1
- package/dist/tests/e2e/gui-font-face.test.js +99 -7
- package/dist/tests/e2e/gui-font-face.test.js.map +1 -1
- package/dist/tests/e2e/gui-frame-pacing.test.d.ts +15 -0
- package/dist/tests/e2e/gui-frame-pacing.test.js +68 -0
- package/dist/tests/e2e/gui-frame-pacing.test.js.map +1 -0
- package/dist/tests/e2e/gui-initial-url.test.d.ts +10 -0
- package/dist/tests/e2e/gui-initial-url.test.js +49 -0
- package/dist/tests/e2e/gui-initial-url.test.js.map +1 -0
- package/dist/tests/e2e/gui-layout.test.js +85 -0
- package/dist/tests/e2e/gui-layout.test.js.map +1 -1
- package/dist/tests/e2e/gui-webgl-depth-init.test.d.ts +13 -0
- package/dist/tests/e2e/gui-webgl-depth-init.test.js +144 -0
- package/dist/tests/e2e/gui-webgl-depth-init.test.js.map +1 -0
- package/dist/tests/e2e/gui-webgl-depth-range.test.d.ts +18 -0
- package/dist/tests/e2e/gui-webgl-depth-range.test.js +140 -0
- package/dist/tests/e2e/gui-webgl-depth-range.test.js.map +1 -0
- package/dist/tests/e2e/gui-webgl.test.js +49 -0
- package/dist/tests/e2e/gui-webgl.test.js.map +1 -1
- package/dist/tests/e2e/gui-webgpu-attachment.test.d.ts +19 -0
- package/dist/tests/e2e/gui-webgpu-attachment.test.js +258 -0
- package/dist/tests/e2e/gui-webgpu-attachment.test.js.map +1 -0
- package/dist/tests/e2e/method-call-cache.test.js +27 -0
- package/dist/tests/e2e/method-call-cache.test.js.map +1 -1
- package/dist/tests/extensions/gui-features.test.js +27 -2
- package/dist/tests/extensions/gui-features.test.js.map +1 -1
- package/doc/ai/extensions.md +10 -4
- package/doc/ai/zh-CN/extensions.md +8 -3
- package/doc/gui/animation.md +1 -1
- package/doc/gui/api.md +35 -2
- package/doc/gui/build.md +34 -15
- package/doc/gui/dom.md +3 -2
- package/doc/gui/known-issues.md +1 -1
- package/doc/gui/layout.md +9 -3
- package/doc/gui/rendering.md +45 -8
- package/doc/gui/runtime.md +13 -0
- package/doc/gui/webgl.md +29 -3
- package/doc/gui/webgpu.md +20 -0
- package/doc/gui.md +9 -4
- package/doc/implemented/codegen.md +4 -3
- package/doc/zh-CN/gui/animation.md +1 -1
- package/doc/zh-CN/gui/api.md +25 -2
- package/doc/zh-CN/gui/build.md +20 -7
- package/doc/zh-CN/gui/dom.md +3 -2
- package/doc/zh-CN/gui/known-issues.md +1 -1
- package/doc/zh-CN/gui/layout.md +7 -4
- package/doc/zh-CN/gui/rendering.md +33 -8
- package/doc/zh-CN/gui/runtime.md +9 -0
- package/doc/zh-CN/gui/webgl.md +7 -4
- package/doc/zh-CN/gui/webgpu.md +18 -0
- package/doc/zh-CN/gui.md +10 -5
- package/doc/zh-CN/implemented/codegen.md +4 -3
- package/package.json +7 -7
- package/runtime/ext_gui/audio_graph_commands.cpp +127 -0
- package/runtime/ext_gui/audio_mixer.cpp +84 -163
- package/runtime/ext_gui/audio_mixer.h +59 -3
- package/runtime/ext_gui/audio_mixer_extra.cpp +8 -0
- package/runtime/ext_gui/audio_param_apply.cpp +160 -0
- package/runtime/ext_gui/browser.cpp +6 -19
- package/runtime/ext_gui/browser_location.cpp +78 -0
- package/runtime/ext_gui/css.cpp +1 -0
- package/runtime/ext_gui/css.h +4 -0
- package/runtime/ext_gui/css_sheet.cpp +4 -2
- package/runtime/ext_gui/document_animation.cpp +7 -0
- package/runtime/ext_gui/dom_api_computed_style.cpp +3 -2
- package/runtime/ext_gui/dom_api_webgl.cpp +39 -2
- package/runtime/ext_gui/dom_api_webgl_extensions.cpp +134 -0
- package/runtime/ext_gui/dom_api_webgl_internal.h +4 -0
- package/runtime/ext_gui/dom_api_webgl_shader.cpp +28 -4
- package/runtime/ext_gui/dom_api_webgl_state.cpp +6 -103
- package/runtime/ext_gui/gui.cpp +100 -1
- package/runtime/ext_gui/gui_events.cpp +8 -2
- package/runtime/ext_gui/layout_flex.cpp +5 -2
- package/runtime/ext_gui/layout_flow.cpp +24 -1
- package/runtime/ext_gui/layout_flow_internal.h +11 -2
- package/runtime/ext_gui/media_query.cpp +3 -0
- package/runtime/ext_gui/perf.cpp +18 -6
- package/runtime/ext_gui/perf.h +37 -0
- package/runtime/ext_gui/style.cpp +28 -10
- package/runtime/ext_gui/style.h +10 -1
- package/runtime/ext_gui/style_length.cpp +4 -0
- package/runtime/ext_gui/style_print.cpp +7 -1
- package/runtime/ext_gui/style_values.cpp +6 -5
- package/runtime/ext_gui/text.cpp +4 -0
- package/runtime/ext_gui/text_font_bytes.cpp +117 -0
- package/runtime/ext_gui/text_font_bytes.h +65 -0
- package/runtime/ext_gui/text_font_db.cpp +5 -0
- package/runtime/ext_gui/text_font_sfnt.cpp +71 -24
- package/runtime/ext_gui/text_font_sfnt.h +5 -2
- package/runtime/ext_gui/text_hb.cpp +34 -5
- package/runtime/ext_gui/text_stb.cpp +7 -30
- package/runtime/ext_gui/text_webfont.cpp +217 -0
- package/runtime/ext_gui/warnings.cpp +26 -0
- package/runtime/ext_gui/warnings.h +8 -0
- package/runtime/ext_gui/webfont_bridge.c +23 -0
- package/runtime/ext_gui/webgl.h +36 -39
- package/runtime/ext_gui/webgl_blit_color.cpp +5 -0
- package/runtime/ext_gui/webgl_buffer_objects.cpp +19 -5
- package/runtime/ext_gui/webgl_context.cpp +2 -0
- package/runtime/ext_gui/webgl_draw.cpp +72 -12
- package/runtime/ext_gui/webgl_draw_setup.cpp +8 -2
- package/runtime/ext_gui/webgl_draw_state.h +13 -2
- package/runtime/ext_gui/webgl_framebuffer.cpp +8 -0
- package/runtime/ext_gui/webgl_objects.h +19 -0
- package/runtime/ext_gui/webgl_program.h +64 -0
- package/runtime/ext_gui/webgl_state.cpp +7 -0
- package/runtime/ext_gui/webgl_targets.cpp +31 -7
- package/runtime/ext_gui/webgl_uniform.cpp +78 -0
- package/runtime/ext_gui/webgpu.h +10 -0
- package/runtime/ext_gui/webgpu_buffer.cpp +3 -1
- package/runtime/ext_gui/webgpu_canvas.cpp +1 -0
- package/runtime/ext_gui/webgpu_command.cpp +51 -11
- package/runtime/ext_gui/webgpu_convert.cpp +7 -2
- package/runtime/ext_gui/webgpu_pass.cpp +12 -0
- package/runtime/ext_gui/webgpu_queue.cpp +3 -0
- package/runtime/ext_gui/webgpu_resources.cpp +1 -0
- package/runtime/ext_gui/window.cpp +6 -0
- package/runtime/rt_object.h +6 -0
- package/runtime/rt_profile.h +6 -0
- package/runtime/xt_containers/access.inc +2 -47
- package/runtime/xt_containers/ic_get.inc +70 -0
- package/runtime/xt_containers/method_cache.inc +42 -11
- package/runtime/xt_containers/objects.inc +12 -1
- package/runtime/xt_containers/shapes.inc +78 -0
- package/runtime/xt_containers.c +1 -0
- package/runtime/xt_profile.c +3 -0
- package/scripts/build-gui.ts +43 -49
- package/scripts/gui-engine-build.ts +58 -0
- package/scripts/gui-vendor-source.ts +53 -0
- package/scripts/gui-webfont-build.ts +138 -0
- package/src/cli/help.ts +1 -1
- package/src/codegen/generator/calls/invocation.ts +6 -4
- package/src/codegen/generator/context.ts +6 -6
- package/src/codegen/generator/expressions/assignment.ts +3 -3
- package/src/driver/config.ts +1 -1
- package/src/driver/options.ts +1 -1
- package/src/driver/version.ts +1 -1
- package/src/extensions/gui/features.ts +34 -6
- package/src/extensions/gui/index.ts +3 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* xbintsc GUI engine — queued AudioParam scheduling.
|
|
3
|
+
*
|
|
4
|
+
* The mixer renders a 128-frame quantum while holding its graph mutex, and a
|
|
5
|
+
* reverb convolver makes that quantum take up to a few milliseconds. A page
|
|
6
|
+
* schedules its sounds from `requestAnimationFrame` (`gain.value = …`,
|
|
7
|
+
* `setTargetAtTime`, the ramps, …); taking the same mutex made every one of
|
|
8
|
+
* those calls wait for the current quantum, which showed up as main-thread
|
|
9
|
+
* frame time — on the Saltline scene it was the single largest audio cost.
|
|
10
|
+
*
|
|
11
|
+
* The setters below therefore *queue* a command instead: the audio thread
|
|
12
|
+
* applies queued commands at the next quantum boundary, in FIFO order, with the
|
|
13
|
+
* mutex already held. `param_value` flushes first because a getter must observe
|
|
14
|
+
* a just-written value; ordering between queued commands is preserved.
|
|
15
|
+
*
|
|
16
|
+
* A node the audio thread has not inserted yet is the exception: the FIFO runs
|
|
17
|
+
* on the audio thread, so a write to a node that is still in `pending_nodes_`
|
|
18
|
+
* would not be observable before the next quantum — and not at all when no
|
|
19
|
+
* audio thread exists (a headless host, or a graph built before the first
|
|
20
|
+
* `start()`). Such writes are applied directly to the pending node instead
|
|
21
|
+
* (`mutate_pending_param`); `param_value` already reads that table, so the
|
|
22
|
+
* getter observes them. Ordering is unaffected: the insertion command erases
|
|
23
|
+
* the pending entry under the same lock, so every direct write happens before
|
|
24
|
+
* the node can be rendered, and every later write for it goes through the FIFO.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#include "audio_mixer.h"
|
|
28
|
+
|
|
29
|
+
#include <utility>
|
|
30
|
+
|
|
31
|
+
namespace xtgui {
|
|
32
|
+
|
|
33
|
+
void AudioMixer::post_command(std::function<void()> command) {
|
|
34
|
+
std::lock_guard<std::mutex> lock(command_mutex_);
|
|
35
|
+
commands_.push_back(std::move(command));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
void AudioMixer::drain_commands_locked() {
|
|
39
|
+
std::vector<std::function<void()>> pending;
|
|
40
|
+
{
|
|
41
|
+
std::lock_guard<std::mutex> lock(command_mutex_);
|
|
42
|
+
pending.swap(commands_);
|
|
43
|
+
}
|
|
44
|
+
for (std::function<void()> &command : pending) command();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
namespace {
|
|
48
|
+
|
|
49
|
+
double audio_now(const AudioMixer &mixer) {
|
|
50
|
+
return mixer.current_time();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
} // namespace
|
|
54
|
+
|
|
55
|
+
double AudioMixer::param_value(uint64_t node, int index) {
|
|
56
|
+
/* A node created on this thread is not in `nodes_` until the audio thread
|
|
57
|
+
* inserts it; read its values from the pending table instead of flushing the
|
|
58
|
+
* queue (which would wait for the render lock). Parameter writes for a
|
|
59
|
+
* pending node were applied directly there, so this is not a stale default. */
|
|
60
|
+
{
|
|
61
|
+
std::lock_guard<std::mutex> pending_lock(pending_mutex_);
|
|
62
|
+
auto found = pending_nodes_.find(node);
|
|
63
|
+
if (found != pending_nodes_.end()) {
|
|
64
|
+
const AudioNode &target = *found->second;
|
|
65
|
+
if (index < 0 || index >= target.param_count) return 0.0;
|
|
66
|
+
return target.params[index].value_at(audio_now(*this));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
std::lock_guard<std::mutex> lock(mutex_);
|
|
70
|
+
drain_commands_locked();
|
|
71
|
+
AudioNode *target = node_locked(node);
|
|
72
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return 0.0;
|
|
73
|
+
return target->params[index].value_at(audio_now(*this));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
void AudioMixer::param_set(uint64_t node, int index, double value) {
|
|
77
|
+
const double now = audio_now(*this);
|
|
78
|
+
if (mutate_pending_param(node, index,
|
|
79
|
+
[&](AudioParamState ¶m) { param.set_value(value, now); })) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
post_command([this, node, index, value]() {
|
|
83
|
+
AudioNode *target = node_locked(node);
|
|
84
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
85
|
+
target->params[index].set_value(value, audio_now(*this));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
void AudioMixer::param_set_at(uint64_t node, int index, double value, double time) {
|
|
90
|
+
if (mutate_pending_param(node, index,
|
|
91
|
+
[&](AudioParamState ¶m) { param.set_value_at_time(value, time); })) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
post_command([this, node, index, value, time]() {
|
|
95
|
+
AudioNode *target = node_locked(node);
|
|
96
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
97
|
+
target->params[index].set_value_at_time(value, time);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
void AudioMixer::param_linear_ramp(uint64_t node, int index, double value, double time) {
|
|
102
|
+
if (mutate_pending_param(node, index,
|
|
103
|
+
[&](AudioParamState ¶m) { param.linear_ramp(value, time); })) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
post_command([this, node, index, value, time]() {
|
|
107
|
+
AudioNode *target = node_locked(node);
|
|
108
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
109
|
+
target->params[index].linear_ramp(value, time);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
void AudioMixer::param_exponential_ramp(uint64_t node, int index, double value, double time) {
|
|
114
|
+
if (mutate_pending_param(node, index,
|
|
115
|
+
[&](AudioParamState ¶m) { param.exponential_ramp(value, time); })) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
post_command([this, node, index, value, time]() {
|
|
119
|
+
AudioNode *target = node_locked(node);
|
|
120
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
121
|
+
target->params[index].exponential_ramp(value, time);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
void AudioMixer::param_set_target(uint64_t node, int index, double value, double time,
|
|
126
|
+
double time_constant) {
|
|
127
|
+
if (mutate_pending_param(node, index, [&](AudioParamState ¶m) {
|
|
128
|
+
param.set_target(value, time, time_constant);
|
|
129
|
+
})) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
post_command([this, node, index, value, time, time_constant]() {
|
|
133
|
+
AudioNode *target = node_locked(node);
|
|
134
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
135
|
+
target->params[index].set_target(value, time, time_constant);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
void AudioMixer::param_cancel(uint64_t node, int index, double time, bool hold) {
|
|
140
|
+
if (mutate_pending_param(node, index, [&](AudioParamState ¶m) {
|
|
141
|
+
if (hold) {
|
|
142
|
+
param.cancel_and_hold(time);
|
|
143
|
+
} else {
|
|
144
|
+
param.cancel_scheduled(time);
|
|
145
|
+
}
|
|
146
|
+
})) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
post_command([this, node, index, time, hold]() {
|
|
150
|
+
AudioNode *target = node_locked(node);
|
|
151
|
+
if (target == nullptr || index < 0 || index >= target->param_count) return;
|
|
152
|
+
if (hold) {
|
|
153
|
+
target->params[index].cancel_and_hold(time);
|
|
154
|
+
} else {
|
|
155
|
+
target->params[index].cancel_scheduled(time);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
} // namespace xtgui
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
#include <string>
|
|
26
26
|
#include <unordered_map>
|
|
27
27
|
|
|
28
|
+
/* Defined in browser_location.cpp, which keeps this unit inside the file-length
|
|
29
|
+
* budget. Declared outside the anonymous namespace so it keeps external
|
|
30
|
+
* linkage. */
|
|
31
|
+
xt_value xt_gui_location_build(void);
|
|
32
|
+
|
|
28
33
|
namespace {
|
|
29
34
|
|
|
30
35
|
xt_value g_navigator = XT_UNDEFINED;
|
|
@@ -235,24 +240,6 @@ xt_value navigator_build(void) {
|
|
|
235
240
|
return nav;
|
|
236
241
|
}
|
|
237
242
|
|
|
238
|
-
xt_value location_build(void) {
|
|
239
|
-
xt_value location = xt_object_new();
|
|
240
|
-
set_prop(location, "href", string_of("xbintsc://localhost/"));
|
|
241
|
-
set_prop(location, "protocol", string_of("xbintsc:"));
|
|
242
|
-
set_prop(location, "host", string_of("localhost"));
|
|
243
|
-
set_prop(location, "hostname", string_of("localhost"));
|
|
244
|
-
set_prop(location, "port", string_of(""));
|
|
245
|
-
set_prop(location, "pathname", string_of("/"));
|
|
246
|
-
set_prop(location, "search", string_of(""));
|
|
247
|
-
set_prop(location, "hash", string_of(""));
|
|
248
|
-
set_prop(location, "origin", string_of("xbintsc://localhost"));
|
|
249
|
-
set_method(location, "reload", (void *)noop);
|
|
250
|
-
set_method(location, "assign", (void *)noop);
|
|
251
|
-
set_method(location, "replace", (void *)noop);
|
|
252
|
-
set_prop(location, "toString", fn_of((void *)noop));
|
|
253
|
-
return location;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
243
|
/* -- localStorage --------------------------------------------------------- */
|
|
257
244
|
|
|
258
245
|
xt_value storage_get_item(xt_value self, xt_value env, int32_t argc, xt_value *argv) {
|
|
@@ -446,7 +433,7 @@ void ensure_singletons(void) {
|
|
|
446
433
|
xt_gc_add_root(&g_local_storage);
|
|
447
434
|
}
|
|
448
435
|
if (!XT_IS_OBJECT(g_location)) {
|
|
449
|
-
g_location =
|
|
436
|
+
g_location = xt_gui_location_build();
|
|
450
437
|
xt_gc_add_root(&g_location);
|
|
451
438
|
}
|
|
452
439
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* xbintsc GUI engine — the `location` object.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `browser.cpp` to keep that unit within the repository's
|
|
5
|
+
* file-length budget. The interesting part is `XT_GUI_URL`: a page addresses
|
|
6
|
+
* itself through `location.search`/`location.hash` (`?bench=1`, `?q=low`,
|
|
7
|
+
* `#shot`), and a compiled program has no browser address bar to supply them.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "gui_engine.h"
|
|
11
|
+
|
|
12
|
+
#include <string>
|
|
13
|
+
|
|
14
|
+
namespace {
|
|
15
|
+
|
|
16
|
+
xt_value string_of(const char *text) { return xt_string_from_cstr(text != NULL ? text : ""); }
|
|
17
|
+
|
|
18
|
+
xt_value fn_of(void *fn) { return xt_closure_new(fn, 0, NULL); }
|
|
19
|
+
|
|
20
|
+
void set_prop(xt_value target, const char *name, xt_value value) {
|
|
21
|
+
xt_object_set(target, xt_string_from_cstr(name), value);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
void set_method(xt_value target, const char *name, void *fn) { set_prop(target, name, fn_of(fn)); }
|
|
25
|
+
|
|
26
|
+
xt_value noop(xt_value self, xt_value env, int32_t argc, xt_value *argv) {
|
|
27
|
+
(void)self;
|
|
28
|
+
(void)env;
|
|
29
|
+
(void)argc;
|
|
30
|
+
(void)argv;
|
|
31
|
+
return XT_UNDEFINED;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
} // namespace
|
|
35
|
+
|
|
36
|
+
xt_value xt_gui_location_build(void) {
|
|
37
|
+
xt_value location = xt_object_new();
|
|
38
|
+
std::string pathname = "/";
|
|
39
|
+
std::string search;
|
|
40
|
+
std::string hash;
|
|
41
|
+
/* `XT_GUI_URL` may be a bare `?query`/`#hash` or a `path?query#hash`; the
|
|
42
|
+
* origin stays `xbintsc://localhost`. Unset keeps the historical empty URL. */
|
|
43
|
+
const char *configured = SDL_getenv("XT_GUI_URL");
|
|
44
|
+
if (configured != NULL && configured[0] != '\0') {
|
|
45
|
+
std::string rest(configured);
|
|
46
|
+
const size_t scheme = rest.find("://");
|
|
47
|
+
if (scheme != std::string::npos) {
|
|
48
|
+
const size_t slash = rest.find('/', scheme + 3);
|
|
49
|
+
rest = slash == std::string::npos ? std::string() : rest.substr(slash);
|
|
50
|
+
}
|
|
51
|
+
const size_t hash_at = rest.find('#');
|
|
52
|
+
if (hash_at != std::string::npos) {
|
|
53
|
+
hash = rest.substr(hash_at);
|
|
54
|
+
rest.erase(hash_at);
|
|
55
|
+
}
|
|
56
|
+
const size_t query_at = rest.find('?');
|
|
57
|
+
if (query_at != std::string::npos) {
|
|
58
|
+
search = rest.substr(query_at);
|
|
59
|
+
rest.erase(query_at);
|
|
60
|
+
}
|
|
61
|
+
if (!rest.empty()) pathname = rest[0] == '/' ? rest : "/" + rest;
|
|
62
|
+
}
|
|
63
|
+
const std::string href = "xbintsc://localhost" + pathname + search + hash;
|
|
64
|
+
set_prop(location, "href", string_of(href.c_str()));
|
|
65
|
+
set_prop(location, "protocol", string_of("xbintsc:"));
|
|
66
|
+
set_prop(location, "host", string_of("localhost"));
|
|
67
|
+
set_prop(location, "hostname", string_of("localhost"));
|
|
68
|
+
set_prop(location, "port", string_of(""));
|
|
69
|
+
set_prop(location, "pathname", string_of(pathname.c_str()));
|
|
70
|
+
set_prop(location, "search", string_of(search.c_str()));
|
|
71
|
+
set_prop(location, "hash", string_of(hash.c_str()));
|
|
72
|
+
set_prop(location, "origin", string_of("xbintsc://localhost"));
|
|
73
|
+
set_method(location, "reload", (void *)noop);
|
|
74
|
+
set_method(location, "assign", (void *)noop);
|
|
75
|
+
set_method(location, "replace", (void *)noop);
|
|
76
|
+
set_prop(location, "toString", fn_of((void *)noop));
|
|
77
|
+
return location;
|
|
78
|
+
}
|
package/runtime/ext_gui/css.cpp
CHANGED
|
@@ -128,6 +128,7 @@ static Length makeScalarLength(double number, const std::string &rawUnit) {
|
|
|
128
128
|
else if (unit == "rem") length.unit = Unit::Rem;
|
|
129
129
|
else if (unit == "vw") length.unit = Unit::Vw;
|
|
130
130
|
else if (unit == "vh") length.unit = Unit::Vh;
|
|
131
|
+
else if (unit == "ch") length.unit = Unit::Ch;
|
|
131
132
|
else if (unit == "pt") { length.value = (float)number * (96.0f / 72.0f); length.unit = Unit::Px; }
|
|
132
133
|
else if (unit == "pc") { length.value = (float)number * 16.0f; length.unit = Unit::Px; }
|
|
133
134
|
else if (unit == "in") { length.value = (float)number * 96.0f; length.unit = Unit::Px; }
|
package/runtime/ext_gui/css.h
CHANGED
|
@@ -26,6 +26,10 @@ enum class Unit {
|
|
|
26
26
|
Rem,
|
|
27
27
|
Vw,
|
|
28
28
|
Vh,
|
|
29
|
+
/** `ch`: the advance width of "0" in the element's font. Resolved as half an
|
|
30
|
+
* `em`, the usual measure for a digit in the proportional faces the engine
|
|
31
|
+
* loads; see `doc/gui/known-issues.md` for that approximation. */
|
|
32
|
+
Ch,
|
|
29
33
|
Number,
|
|
30
34
|
Clamp,
|
|
31
35
|
Min,
|
|
@@ -208,8 +208,10 @@ bool functionArgument(const std::string &text, size_t open_paren, std::string *o
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/** Parse the `src` descriptor: keep every `url(...)` source in order and drop
|
|
211
|
-
* `local(...)`. The `format(...)` hint is
|
|
212
|
-
*
|
|
211
|
+
* `local(...)`. The `format(...)` hint is kept but is advisory only: the runtime
|
|
212
|
+
* tries each source and detects the container from the file's signature, so a
|
|
213
|
+
* mislabelled entry still loads and an unknown format falls through to the
|
|
214
|
+
* next source. */
|
|
213
215
|
void parseFontFaceSources(const std::string &value, FontFaceRule *rule) {
|
|
214
216
|
rule->sources.clear();
|
|
215
217
|
for (const std::string &part : xt_css_split_commas(value)) {
|
|
@@ -423,6 +423,13 @@ bool XtDocument::advance(double delta_ms) {
|
|
|
423
423
|
if (previous < end && clock_ms_ >= end) just_finished = true;
|
|
424
424
|
}
|
|
425
425
|
if (!running && !just_finished) return false;
|
|
426
|
+
/* A pending restyle is about to call `updateDisplay()` again with the clock
|
|
427
|
+
* we just advanced. Rebuilding the displayed styles here too meant a full
|
|
428
|
+
* per-node style copy and a full layout twice on every dirty frame of an
|
|
429
|
+
* animating page — the Saltline HUD mutates a transform every frame while a
|
|
430
|
+
* transition is running, so that was the normal path. The restyle's
|
|
431
|
+
* `updateDisplay()` produces exactly the same result. */
|
|
432
|
+
if (dirty_) return false;
|
|
426
433
|
updateDisplay();
|
|
427
434
|
return true;
|
|
428
435
|
}
|
|
@@ -65,8 +65,9 @@ std::string computed_value(const xtgui::XtStyle *style, const std::string &rawNa
|
|
|
65
65
|
std::string property = xtgui::xt_css_lower(xtgui::xt_css_trim(mapped));
|
|
66
66
|
if (property.empty()) return std::string();
|
|
67
67
|
if (property.size() > 2 && property[0] == '-' && property[1] == '-') {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
if (!style->variables) return std::string();
|
|
69
|
+
auto found = style->variables->find(property);
|
|
70
|
+
return found == style->variables->end() ? std::string() : found->second;
|
|
70
71
|
}
|
|
71
72
|
return xtgui::xt_style_property_to_string(*style, property);
|
|
72
73
|
}
|
|
@@ -306,8 +306,14 @@ std::string webgl_string(int32_t argc, xt_value *argv, int32_t index) {
|
|
|
306
306
|
|
|
307
307
|
std::vector<double> webgl_numbers(xt_value value) {
|
|
308
308
|
std::vector<double> out;
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
/* A WebGL numeric argument may be a typed array *or* a plain JavaScript
|
|
310
|
+
* array: the spec's IDL accepts `sequence<GLfloat>`, and three.js relies on
|
|
311
|
+
* it (`uniform1fv` is handed the plain `weights` array of the PMREM blur
|
|
312
|
+
* shader without a `Float32Array` conversion). Arrays carry `XT_TAG_ARRAY`,
|
|
313
|
+
* not `XT_TAG_OBJECT`, so both tags have to be accepted here. */
|
|
314
|
+
const bool is_array = XT_IS_ARRAY(value);
|
|
315
|
+
if (!XT_IS_OBJECT(value) && !is_array) return out;
|
|
316
|
+
const int kind = is_array ? -1 : xt_typed_array_kind_of(value);
|
|
311
317
|
const double length = xt_to_number(xt_get(value, xt_string_from_cstr("length")));
|
|
312
318
|
if (!(length > 0.0) || length > 100000000.0) return out;
|
|
313
319
|
out.reserve((size_t)length);
|
|
@@ -321,6 +327,37 @@ std::vector<double> webgl_numbers(xt_value value) {
|
|
|
321
327
|
return out;
|
|
322
328
|
}
|
|
323
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Copy a 32-bit typed array's elements as `float` in one memcpy.
|
|
332
|
+
*
|
|
333
|
+
* A `Float32Array` passed to `uniformMatrix4fv` is the hot WebGL call of every
|
|
334
|
+
* three.js frame; the generic `webgl_numbers` path allocated a `double` vector
|
|
335
|
+
* and made one runtime call per element. The element width is inferred from
|
|
336
|
+
* `byteLength == length * 4`, which is exactly the set of views a float uniform
|
|
337
|
+
* accepts (Float32Array, and the invalid-but-tolerated Int32/Uint32). Plain
|
|
338
|
+
* arrays and other views return false and keep the old path.
|
|
339
|
+
*/
|
|
340
|
+
bool webgl_float_elements(xt_value value, std::vector<float> *out) {
|
|
341
|
+
out->clear();
|
|
342
|
+
if (!XT_IS_OBJECT(value) || xt_typed_array_kind_of(value) < 0) return false;
|
|
343
|
+
const double length = xt_to_number(xt_get(value, xt_string_from_cstr("length")));
|
|
344
|
+
const double bytes = xt_to_number(xt_get(value, xt_string_from_cstr("byteLength")));
|
|
345
|
+
if (!(length >= 0.0) || bytes != length * 4.0) return false;
|
|
346
|
+
xt_value buffer = xt_typed_array_buffer_of(value);
|
|
347
|
+
if (!xt_is_array_buffer(buffer)) return false;
|
|
348
|
+
const uint32_t offset = xt_typed_array_byte_offset_of(value);
|
|
349
|
+
out->resize((size_t)length);
|
|
350
|
+
if (length > 0.0) {
|
|
351
|
+
const uint32_t byte_length = (uint32_t)(length * 4.0);
|
|
352
|
+
auto *bytes = reinterpret_cast<uint8_t *>(out->data());
|
|
353
|
+
if (xt_array_buffer_copy_bytes_out(buffer, offset, bytes, byte_length) != byte_length) {
|
|
354
|
+
out->clear();
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
|
|
324
361
|
std::vector<uint8_t> webgl_bytes(xt_value value) {
|
|
325
362
|
std::vector<uint8_t> out;
|
|
326
363
|
if (!XT_IS_OBJECT(value)) return out;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* xbintsc GUI engine — WebGL extension entry points.
|
|
3
|
+
*
|
|
4
|
+
* `getSupportedExtensions` / `getExtension` decide what a capability probe sees;
|
|
5
|
+
* the compressed-texture families are built by `dom_api_webgl_compressed.cpp`.
|
|
6
|
+
* `WEBGL_lose_context` lives here too because its two methods are the only
|
|
7
|
+
* extension that carries behaviour. `KHR_parallel_shader_compile` publishes
|
|
8
|
+
* only `COMPLETION_STATUS_KHR`: translation is synchronous, so the completion
|
|
9
|
+
* query is always true (`dom_api_webgl_shader.cpp`).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
#include "dom_api_internal.h"
|
|
13
|
+
|
|
14
|
+
#include <string>
|
|
15
|
+
|
|
16
|
+
#include "webgl.h"
|
|
17
|
+
|
|
18
|
+
#define METHOD(name) xt_value name(xt_value self, xt_value env, int32_t argc, xt_value *argv)
|
|
19
|
+
|
|
20
|
+
namespace domapi {
|
|
21
|
+
namespace {
|
|
22
|
+
|
|
23
|
+
/** Fire a `webglcontextlost`/`webglcontextrestored` event on the canvas that
|
|
24
|
+
* owns the context. `self` is the context or extension handle. */
|
|
25
|
+
void dispatch_context_event(xt_value self, const char *type) {
|
|
26
|
+
XtGuiWindow *win = nullptr;
|
|
27
|
+
xtgui::Node *node = resolve_node(xt_object_get_cstr(self, "__xt_gl_node"), &win);
|
|
28
|
+
if (win != nullptr && node != nullptr) xt_gui_dispatch_to_node(win, node, type);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
} // namespace
|
|
32
|
+
|
|
33
|
+
METHOD(webgl_lose_context);
|
|
34
|
+
METHOD(webgl_restore_context);
|
|
35
|
+
|
|
36
|
+
METHOD(webgl_get_supported_extensions) {
|
|
37
|
+
(void)env;
|
|
38
|
+
(void)argc;
|
|
39
|
+
(void)argv;
|
|
40
|
+
xt_value list = xt_array_new(0, nullptr);
|
|
41
|
+
xt_array_push(list, xt_string_from_cstr("OES_element_index_uint"));
|
|
42
|
+
xt_array_push(list, xt_string_from_cstr("OES_standard_derivatives"));
|
|
43
|
+
xt_array_push(list, xt_string_from_cstr("OES_texture_float"));
|
|
44
|
+
xt_array_push(list, xt_string_from_cstr("OES_texture_half_float"));
|
|
45
|
+
xt_array_push(list, xt_string_from_cstr("WEBGL_depth_texture"));
|
|
46
|
+
xt_array_push(list, xt_string_from_cstr("EXT_color_buffer_float"));
|
|
47
|
+
xt_array_push(list, xt_string_from_cstr("EXT_color_buffer_half_float"));
|
|
48
|
+
xt_array_push(list, xt_string_from_cstr("WEBGL_lose_context"));
|
|
49
|
+
/* Compilation is synchronous, so the completion query is always true; the
|
|
50
|
+
* extension is still advertised because three.js (and other loaders) warn
|
|
51
|
+
* when a probe finds it missing. */
|
|
52
|
+
xt_array_push(list, xt_string_from_cstr("KHR_parallel_shader_compile"));
|
|
53
|
+
xt_array_push(list, xt_string_from_cstr("EXT_texture_filter_anisotropic"));
|
|
54
|
+
xtgui::WebGLContext *context = webgl_from_context(self);
|
|
55
|
+
if (context != nullptr && context->supports_texture_format(0x83F1)) {
|
|
56
|
+
xt_array_push(list, xt_string_from_cstr("WEBGL_compressed_texture_s3tc"));
|
|
57
|
+
}
|
|
58
|
+
if (context != nullptr && context->supports_texture_format(0x8C4D)) {
|
|
59
|
+
xt_array_push(list, xt_string_from_cstr("WEBGL_compressed_texture_s3tc_srgb"));
|
|
60
|
+
}
|
|
61
|
+
if (context != nullptr && context->supports_texture_format(0x93B0)) {
|
|
62
|
+
xt_array_push(list, xt_string_from_cstr("WEBGL_compressed_texture_astc"));
|
|
63
|
+
}
|
|
64
|
+
return list;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
METHOD(webgl_get_extension) {
|
|
68
|
+
(void)env;
|
|
69
|
+
const std::string name = webgl_string(argc, argv, 0);
|
|
70
|
+
if (name.rfind("WEBGL_compressed_texture_", 0) == 0) {
|
|
71
|
+
xt_value extension = webgl_compressed_extension(name, webgl_from_context(self));
|
|
72
|
+
if (!XT_IS_UNDEFINED(extension)) return extension;
|
|
73
|
+
}
|
|
74
|
+
if (name == "OES_element_index_uint" || name == "OES_standard_derivatives" ||
|
|
75
|
+
name == "OES_texture_float" || name == "OES_texture_half_float" ||
|
|
76
|
+
name == "WEBGL_depth_texture" || name == "EXT_color_buffer_float" ||
|
|
77
|
+
name == "EXT_color_buffer_half_float") {
|
|
78
|
+
return xt_object_new();
|
|
79
|
+
}
|
|
80
|
+
if (name == "EXT_texture_filter_anisotropic") {
|
|
81
|
+
xt_value e = xt_object_new();
|
|
82
|
+
xt_object_set(e, xt_string_from_cstr("MAX_TEXTURE_MAX_ANISOTROPY_EXT"), xt_number(0x84FF));
|
|
83
|
+
xt_object_set(e, xt_string_from_cstr("TEXTURE_MAX_ANISOTROPY_EXT"), xt_number(0x84FE));
|
|
84
|
+
return e;
|
|
85
|
+
}
|
|
86
|
+
if (name == "KHR_parallel_shader_compile") {
|
|
87
|
+
xt_value e = xt_object_new();
|
|
88
|
+
xt_object_set(e, xt_string_from_cstr("COMPLETION_STATUS_KHR"),
|
|
89
|
+
xt_number(xtgui::kWebGLCompletionStatusKHR));
|
|
90
|
+
return e;
|
|
91
|
+
}
|
|
92
|
+
if (name == "WEBGL_lose_context") {
|
|
93
|
+
xt_value object = xt_object_new();
|
|
94
|
+
/* The closures receive this object as `this`, so carry the context id and
|
|
95
|
+
* the canvas handle over from the context that produced the extension. */
|
|
96
|
+
xt_object_set(object, xt_string_from_cstr("__xt_gl_context"),
|
|
97
|
+
xt_object_get_cstr(self, "__xt_gl_context"));
|
|
98
|
+
xt_object_set(object, xt_string_from_cstr("__xt_gl_node"),
|
|
99
|
+
xt_object_get_cstr(self, "__xt_gl_node"));
|
|
100
|
+
xt_object_set(object, xt_string_from_cstr("loseContext"),
|
|
101
|
+
xt_closure_new((void *)webgl_lose_context, 0, nullptr));
|
|
102
|
+
xt_object_set(object, xt_string_from_cstr("restoreContext"),
|
|
103
|
+
xt_closure_new((void *)webgl_restore_context, 0, nullptr));
|
|
104
|
+
return object;
|
|
105
|
+
}
|
|
106
|
+
return XT_NULL;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* `WEBGL_lose_context.loseContext()` / `restoreContext()`: the simulator drops
|
|
110
|
+
* every object and reports `CONTEXT_LOST_WEBGL` until the restore, so a page
|
|
111
|
+
* exercises the same loss/restore path it would take on a real GPU reset. */
|
|
112
|
+
METHOD(webgl_lose_context) {
|
|
113
|
+
(void)env;
|
|
114
|
+
(void)argc;
|
|
115
|
+
(void)argv;
|
|
116
|
+
xtgui::WebGLContext *context = webgl_from_context(self);
|
|
117
|
+
if (context == nullptr || context->lost()) return XT_UNDEFINED;
|
|
118
|
+
context->lose_context();
|
|
119
|
+
dispatch_context_event(self, "webglcontextlost");
|
|
120
|
+
return XT_UNDEFINED;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
METHOD(webgl_restore_context) {
|
|
124
|
+
(void)env;
|
|
125
|
+
(void)argc;
|
|
126
|
+
(void)argv;
|
|
127
|
+
xtgui::WebGLContext *context = webgl_from_context(self);
|
|
128
|
+
if (context == nullptr || !context->lost()) return XT_UNDEFINED;
|
|
129
|
+
context->restore_context();
|
|
130
|
+
if (!context->lost()) dispatch_context_event(self, "webglcontextrestored");
|
|
131
|
+
return XT_UNDEFINED;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
} // namespace domapi
|
|
@@ -39,6 +39,10 @@ int webgl_int(int32_t argc, xt_value *argv, int32_t index, int fallback);
|
|
|
39
39
|
std::string webgl_string(int32_t argc, xt_value *argv, int32_t index);
|
|
40
40
|
/** Read an array/typed array of numbers. */
|
|
41
41
|
std::vector<double> webgl_numbers(xt_value value);
|
|
42
|
+
/** Fast path: copy a 32-bit typed array's elements as floats. Returns false for
|
|
43
|
+
* a plain array or a non-32-bit view (the caller falls back to
|
|
44
|
+
* `webgl_numbers`). */
|
|
45
|
+
bool webgl_float_elements(xt_value value, std::vector<float> *out);
|
|
42
46
|
/** Read the raw bytes of a typed array / ArrayBuffer (or a byte array). */
|
|
43
47
|
std::vector<uint8_t> webgl_bytes(xt_value value);
|
|
44
48
|
/** Store `count` bytes into a typed array / array handle. */
|
|
@@ -98,6 +98,10 @@ METHOD(webgl_get_shader_parameter) {
|
|
|
98
98
|
if (record == nullptr) return XT_NULL;
|
|
99
99
|
if (pname == GL_COMPILE_STATUS) return xt_bool(context->shader_compiled(shader));
|
|
100
100
|
if (pname == GL_DELETE_STATUS) return XT_FALSE;
|
|
101
|
+
if (pname == xtgui::kWebGLCompletionStatusKHR) {
|
|
102
|
+
/* `KHR_parallel_shader_compile`: no compilation is ever pending. */
|
|
103
|
+
return XT_TRUE;
|
|
104
|
+
}
|
|
101
105
|
if (pname == GL_SHADER_TYPE) return xt_number(record->type);
|
|
102
106
|
return XT_NULL;
|
|
103
107
|
}
|
|
@@ -182,6 +186,11 @@ METHOD(webgl_get_program_parameter) {
|
|
|
182
186
|
if (pname == GL_LINK_STATUS) return xt_bool(context->program_linked(program));
|
|
183
187
|
if (pname == GL_VALIDATE_STATUS) return xt_bool(context->program_linked(program));
|
|
184
188
|
if (pname == GL_DELETE_STATUS) return XT_FALSE;
|
|
189
|
+
if (pname == xtgui::kWebGLCompletionStatusKHR) {
|
|
190
|
+
/* `KHR_parallel_shader_compile`: linking is synchronous, so a `compileAsync`
|
|
191
|
+
* poller that waits on this pname finishes on its first tick. */
|
|
192
|
+
return xt_bool(context->program(program) != nullptr);
|
|
193
|
+
}
|
|
185
194
|
if (pname == GL_ATTACHED_SHADERS) {
|
|
186
195
|
return xt_number((double)context->attached_shaders(program).size());
|
|
187
196
|
}
|
|
@@ -317,8 +326,18 @@ void uniform_vectors(xt_value self, int32_t argc, xt_value *argv, int components
|
|
|
317
326
|
uint32_t program = 0;
|
|
318
327
|
int location = 0;
|
|
319
328
|
if (!location_of(xt_arg(argc, argv, 0), &program, &location)) return;
|
|
320
|
-
const
|
|
321
|
-
|
|
329
|
+
const xt_value source = argc > 1 ? xt_arg(argc, argv, 1) : XT_UNDEFINED;
|
|
330
|
+
/* A `Float32Array` is the normal argument; reading its bytes once is much
|
|
331
|
+
* cheaper than a `double` vector built with one runtime call per element. */
|
|
332
|
+
if (!integer) {
|
|
333
|
+
std::vector<float> floats;
|
|
334
|
+
if (webgl_float_elements(source, &floats) && !floats.empty()) {
|
|
335
|
+
const int count = (int)(floats.size() / (size_t)components);
|
|
336
|
+
context->uniform_floats_raw(program, location, components, floats.data(), count);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
const std::vector<double> numbers = webgl_numbers(source);
|
|
322
341
|
if (numbers.empty()) return;
|
|
323
342
|
const int count = (int)(numbers.size() / components);
|
|
324
343
|
if (integer) {
|
|
@@ -405,8 +424,13 @@ void uniform_matrix(xt_value self, int32_t argc, xt_value *argv, int dimensions)
|
|
|
405
424
|
uint32_t program = 0;
|
|
406
425
|
int location = 0;
|
|
407
426
|
if (!location_of(xt_arg(argc, argv, 0), &program, &location)) return;
|
|
408
|
-
const
|
|
409
|
-
|
|
427
|
+
const xt_value source = argc > 2 ? xt_arg(argc, argv, 2) : XT_UNDEFINED;
|
|
428
|
+
std::vector<float> floats;
|
|
429
|
+
if (webgl_float_elements(source, &floats) && !floats.empty()) {
|
|
430
|
+
context->uniform_matrix_raw(program, location, dimensions, floats.data());
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const std::vector<double> values = webgl_numbers(source);
|
|
410
434
|
if (values.empty()) return;
|
|
411
435
|
context->uniform_matrix(program, location, dimensions, values.data());
|
|
412
436
|
}
|