summaryrefslogtreecommitdiff
path: root/src/gpu/sequence_v2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/sequence_v2.cc')
-rw-r--r--src/gpu/sequence_v2.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gpu/sequence_v2.cc b/src/gpu/sequence_v2.cc
index 7c44085..3912849 100644
--- a/src/gpu/sequence_v2.cc
+++ b/src/gpu/sequence_v2.cc
@@ -11,15 +11,20 @@ NodeRegistry::NodeRegistry(WGPUDevice device, int default_width,
int default_height)
: device_(device), default_width_(default_width),
default_height_(default_height) {
- // Create placeholder source/sink nodes (will be updated externally before rendering)
- Node placeholder = {};
- placeholder.type = NodeType::U8X4_NORM;
- placeholder.width = default_width;
- placeholder.height = default_height;
- placeholder.texture = nullptr;
- placeholder.view = nullptr;
- nodes_["source"] = placeholder;
- nodes_["sink"] = placeholder;
+ // Create source/sink nodes with actual textures
+ Node source_node = {};
+ source_node.type = NodeType::U8X4_NORM;
+ source_node.width = default_width;
+ source_node.height = default_height;
+ create_texture(source_node);
+ nodes_["source"] = source_node;
+
+ Node sink_node = {};
+ sink_node.type = NodeType::U8X4_NORM;
+ sink_node.width = default_width;
+ sink_node.height = default_height;
+ create_texture(sink_node);
+ nodes_["sink"] = sink_node;
}
NodeRegistry::~NodeRegistry() {