File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -37,26 +37,9 @@ pub fn initAndDraw(window: Platform.Window) !void {
37
37
}
38
38
```
39
39
40
- This example uses [ mach-glfw] ( https://github.com/hexops/mach-glfw )
40
+ ### Usage with mach-glfw
41
41
42
- ``` zig
43
- const glfw = @import("glfw");
44
- fn glGetProcAddress(p: glfw.GLProc, proc: [:0]const u8) ?gl.FunctionPointer {
45
- _ = p;
46
- return glfw.getProcAddress(proc);
47
- }
48
- pub fn draw(window: glfw.Window) !void {
49
- const proc: glfw.GLProc = undefined;
50
- try gl.load(proc, glGetProcAddress);
51
-
52
- while (!window.shouldClose()) {
53
- gl.clearColor(1, 0, 1, 1);
54
- gl.clear(gl.COLOR_BUFFER_BIT);
55
-
56
- try window.swapBuffers();
57
- }
58
- }
59
- ```
42
+ There is an example of ` mach-glfw ` + ` zig-opengl ` usage available here: https://github.com/hexops/mach-glfw-opengl-example
60
43
61
44
## Pregenerated Loaders
62
45
You can’t perform that action at this time.
0 commit comments