mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-20 03:51:26 +00:00
move from epoxy to glad
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pub usingnamespace @cImport({
|
||||
@cInclude("epoxy/gl.h");
|
||||
@cInclude("glad/gl.h");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user