mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 09:16:11 +03:00
fix invalid ptrcast
This commit is contained in:
@ -72,8 +72,15 @@ pub inline fn use(p: Program) !Binding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Requires the program is currently in use.
|
/// Requires the program is currently in use.
|
||||||
pub inline fn setUniform(p: Program, n: [:0]const u8, value: anytype) !void {
|
pub inline fn setUniform(
|
||||||
const loc = c.glGetUniformLocation(p.id, n);
|
p: Program,
|
||||||
|
n: [:0]const u8,
|
||||||
|
value: anytype,
|
||||||
|
) !void {
|
||||||
|
const loc = c.glGetUniformLocation(
|
||||||
|
p.id,
|
||||||
|
@ptrCast([*c]const u8, n.ptr),
|
||||||
|
);
|
||||||
if (loc < 0) {
|
if (loc < 0) {
|
||||||
return error.UniformNameInvalid;
|
return error.UniformNameInvalid;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user