move from epoxy to glad

This commit is contained in:
Mitchell Hashimoto
2022-04-04 14:35:19 -07:00
parent c42bf7c663
commit c6f1be3343
7 changed files with 3588 additions and 4 deletions

View File

@@ -33,6 +33,13 @@ pub fn init(alloc: std.mem.Allocator) !App {
try glfw.makeContextCurrent(window);
try glfw.swapInterval(1);
// Load OpenGL bindings
if (gl.c.gladLoadGL(
@ptrCast(fn ([*c]const u8) callconv(.C) ?fn () callconv(.C) void, glfw.getProcAddress),
) == 0) {
return error.OpenGLInitFailed;
}
// Blending for text
gl.c.glEnable(gl.c.GL_CULL_FACE);
gl.c.glEnable(gl.c.GL_BLEND);

View File

@@ -1,3 +1,3 @@
pub usingnamespace @cImport({
@cInclude("epoxy/gl.h");
@cInclude("glad/gl.h");
});