renderer: shadertoy functions

This commit is contained in:
Mitchell Hashimoto
2023-11-16 09:22:36 -08:00
parent 3a4aef2dcd
commit 1bd92619b1
7 changed files with 243 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
pub const c = @import("c.zig");
pub const testing = @import("test.zig");
pub usingnamespace @import("init.zig");
pub usingnamespace @import("program.zig");
pub usingnamespace @import("shader.zig");

View File

@@ -35,7 +35,7 @@ pub const Program = opaque {
}
pub fn spirvGetPtr(self: *Program) ![*]u8 {
return c.glslang_program_SPIRV_get_ptr(@ptrCast(self));
return @ptrCast(c.glslang_program_SPIRV_get_ptr(@ptrCast(self)));
}
pub fn spirvGetMessages(self: *Program) ![:0]const u8 {