From bc1e00a5e28cc198981cb59ffe9164b0c62175d1 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 19 Oct 2025 16:38:49 +0200 Subject: add BufferedStreamSource --- src/source.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/source.zig') diff --git a/src/source.zig b/src/source.zig index 21e82c8..917e08a 100644 --- a/src/source.zig +++ b/src/source.zig @@ -9,6 +9,7 @@ pub const Source = struct { deinit_fn: *const fn (self: *Source, allocator: std.mem.Allocator) void, register_fn: ?*const fn (self: *Source, name: []const u8, control: *ctrl.ControlServer) void = null, unregister_fn: ?*const fn (self: *Source, name: []const u8, control: *ctrl.ControlServer) void = null, + update_uniform_fn: ?*const fn (self: *Source, param: []const u8, value: gl.UniformPointer) anyerror!void = null, pub fn deinit(self: *Source, allocator: std.mem.Allocator) void { self.deinit_fn(self, allocator); @@ -25,6 +26,12 @@ pub const Source = struct { unregister_fn(self, name, control); } } + + pub fn updateUniform(self: *Source, param: []const u8, value: gl.UniformPointer) anyerror!void { + if (self.update_uniform_fn) |update_uniform_fn| { + try update_uniform_fn(self, param, value); + } + } }; pub const StreamFlags = struct { -- cgit v1.2.3