An open API service indexing awesome lists of open source software.

https://github.com/griush/zglfw

Zig GLFW bindings
https://github.com/griush/zglfw

zig

Last synced: 14 days ago
JSON representation

Zig GLFW bindings

Awesome Lists containing this project

README

          

# zglfw
Zig GLFW bindings

## Usage
Run `zig fetch --save git+https://github.com/griush/zglfw`.

Add in `build.zig`:
```zig
// module links libc
const zglfw = b.dependency("zglfw", .{});
module.addAnonymousImport("glfw", .{
.root_source_file = zglfw.path("glfw3.zig"),
.target = target,
.optimize = optimize,
});

if (builtin.os.tag == .windows) {
module.addLibraryPath(zglfw.path("bin/windows-mingw64/"));
module.linkSystemLibrary("Gdi32");
}
module.linkSystemLibrary("glfw3");
```