Skip to content

[Wrapper] Adding integers uniforms. #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/wrapper.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2807,19 +2807,28 @@ pub fn Wrap(comptime bindings: anytype) type {
}

// pub var uniform1i: *const fn (location: Int, v0: Int) callconv(.C) void = undefined;
pub fn uniform1i(location: UniformLocation, value: Int) void {
bindings.uniform1i(@as(Int, @bitCast(location)), value);
pub fn uniform1i(location: UniformLocation, v0: Int) void {
bindings.uniform1i(@as(Int, @bitCast(location)), v0);
}

// pub var uniform2i: *const fn (location: Int, v0: Int, v1: Int) callconv(.C) void = undefined;
pub fn uniform2i (location: UniformLocation, v0: i32, v1: i32) void{
bindings.uniform2i(@as(Int, @bitCast(location)), v0, v1);
}
// pub var uniform3i: *const fn (location: Int, v0: Int, v1: Int, v2: Int) callconv(.C) void = undefined;
pub fn uniform3i (location: UniformLocation, v0: i32, v1: i32, v2: i32) void{
bindings.uniform3i(@as(Int, @bitCast(location)), v0, v1, v2);
}
// pub var uniform4i: *const fn (
// location: Int,
// v0: Int,
// v1: Int,
// v2: Int,
// v3: Int,
// ) callconv(.C) void = undefined;
pub fn uniform4i (location: UniformLocation, v0: i32, v1: i32, v2: i32, v3: i32) void{
bindings.uniform4i(@as(Int, @bitCast(location)), v0, v1, v2, v3);
}
// pub var uniform1fv: *const fn (
// location: Int,
// count: Sizei,
Expand Down
Loading