Skip to content

Commit 3cbef1e

Browse files
committed
Remove OpenGL Registry submodule, use zig package manager
1 parent 560b6d5 commit 3cbef1e

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

OpenGL-Registry

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ executable.root_module.addImport("opengl", opengl);
2222
```
2323

2424
## Usage: Standalone
25-
### Cloning
26-
Ensure to also clone the [OpenGL-Registry](https://github.com/KhronosGroup/OpenGL-Registry/) submodule when cloning this
27-
repository. Use:
28-
```sh
29-
git clone https://github.com/MidlightStudio/zig-opengl-bindings.git --recurse-submodules
30-
```
31-
3225
### Building
3326
Building the standalone binary is as simple as:
3427
```sh

build.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub fn build(b: *std.Build) void {
55
const optimize = b.standardOptimizeOption(.{});
66

77
const dishwasher = b.dependency("dishwasher", .{});
8+
const openglRegistry = b.dependency("OpenGL-Registry", .{});
89

910
const exe = b.addExecutable(.{
1011
.name = "zig-opengl-bindings",
@@ -13,7 +14,7 @@ pub fn build(b: *std.Build) void {
1314
.optimize = optimize,
1415
});
1516

16-
exe.root_module.addImport("gl.xml", b.addModule("gl-xml", .{ .root_source_file = b.path("OpenGL-Registry/xml/gl.xml") }));
17+
exe.root_module.addImport("gl.xml", b.addModule("gl-xml", .{ .root_source_file = openglRegistry.path("xml/gl.xml") }));
1718
exe.root_module.addImport("dishwasher", dishwasher.module("dishwasher"));
1819

1920
b.installArtifact(exe);

build.zig.zon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
.url = "https://github.com/edqx/dishwasher/archive/refs/tags/1.0.4.zip",
77
.hash = "12209f29d4963ec005990c46310ce63d883b2c02d1e79906ec60ec1b4f40466d34a0",
88
},
9+
.@"OpenGL-Registry" = .{
10+
.url = "https://github.com/KhronosGroup/OpenGL-Registry/archive/5466009a38991f5ea5c2009105bd83f19fe49979.zip",
11+
.hash = "1220c3c44306989ea798da3441387891a399f960e32eeedbd535e34f838d1cc903ca",
12+
},
913
},
1014
.paths = .{
1115
"build.zig",

0 commit comments

Comments
 (0)