diff options
Diffstat (limited to 'src/main.zig')
-rw-r--r-- | src/main.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig new file mode 100644 index 0000000..a47a8ba --- /dev/null +++ b/src/main.zig @@ -0,0 +1,15 @@ +const alc = @import("alc.zig"); + +fn init() !void { + const device = try alc.openDevice(null); + const context = try alc.createContext(device, null); + try alc.makeContextCurrent(context); +} + +fn deinit() !void { + const context = alc.getCurrentContext(); + const device = try alc.getContextsDevice(context); + try alc.makeContextCurrent(null); + try alc.destroyContext(context); + try alc.closeDevice(device); +} |