aboutsummaryrefslogtreecommitdiffstats
path: root/src/source.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/source.zig')
-rw-r--r--src/source.zig7
1 files changed, 7 insertions, 0 deletions
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 {