@@ -9,22 +9,24 @@ When [zig](https://codeberg.org/ziglang/zig) meets [bgfx](https://github.com/bka
99- [x] Zig api.
1010- [x] Compile as standard zig library.
1111- [x] ` shaderc ` as build artifact.
12- - [x] Shader compile in ` build.zig ` to ` *.bin.h ` .
13- - [x] Shader compile in ` build.zig ` and embed as zig module. (this is zig equivalent of ` *.bin.h ` )
1412- [x] Shader compile from runtime via ` shaderc ` as child process.
13+ - [x] Shader compile in ` build.zig ` and embed as zig module.
1514- [x] Binding for [ DebugDraw API] ( https://github.com/bkaradzic/bgfx/tree/master/examples/common/debugdraw )
1615- [x] ` imgui ` render backend. Use build option ` imgui_include ` to enable. ex. for
1716 zgui: ` .imgui_include = zgui.path("libs").getPath(b), `
1817- [ ] Zig based allocator.
1918
20- > [ !IMPORTANT]
19+ > [ !IMPORTANT]
20+ >
2121> - This is only zig binding. For BGFX stuff goto [ bgfx] ( https://github.com/bkaradzic/bgfx ) .
2222> - Github repository is only mirror. Development continues [ here] ( https://codeberg.org/cyberegoorg/zbgfx )
2323
2424> [ !WARNING]
25+ >
2526> - ` shaderc ` need some time to compile.
2627
2728> [ !NOTE]
29+ >
2830> - If you build shaders/app and see something like ` run shaderc (shader.bin.h) stderr ` .
2931 This is not "true" error (build success), but only in debug build shader print some stuff to stderr and zig
3032 build catch it.
@@ -42,9 +44,9 @@ Minimal is `0.15.1`. But you know try your version and believe.
4244
4345## Bgfx version
4446
45- - [ BX] ( https://github.com/bkaradzic/bx// compare/ce31b1445475ecd4b090471144c4c30a1cbdd871 ...master )
46- - [ BImg] ( https://github.com/bkaradzic/bimg/compare/bf10ffbb3df1f9f12ad7a9105e5e96e11a9c5a0c ...master )
47- - [ BGFX] ( https://github.com/bkaradzic/bgfx/compare/56eb016280731451c3b7f18433dc114df035d52a ...master )
47+ - [ BX] ( https://github.com/bkaradzic/bx/compare/cb281314e14b2684b4ccbbedda662ce6f842e0d5 ...master )
48+ - [ BImg] ( https://github.com/bkaradzic/bimg/compare/5a79b67a49f7c23f8480ae1df356c3411f2c329b ...master )
49+ - [ BGFX] ( https://github.com/bkaradzic/bgfx/compare/b28febb4a8d29d441c3d1ea95d7cbd3d3e0a840c ...master )
4850
4951## Getting started
5052
@@ -93,39 +95,39 @@ cd examples
9395zig build
9496```
9597
96- ### [ 00- Minimal] ( examples/00- minimal/ )
98+ ### [ Minimal GLFW ] ( examples/minimal-glfw / )
9799
98100Minimal setup with GLFW for window and input.
99101
100102``` sh
101- examples/zig-out/bin/00- minimal
103+ examples/zig-out/bin/minimal-glfw
102104```
103105
104106| Key | Description |
105107| -----| --------------|
106108| ` v ` | Vsync on/off |
107109| ` d ` | Debug on/off |
108110
109- ### [ 01-ZGui ] ( examples/01-zgui / )
111+ ### [ Shader embed ] ( examples/shader-embed / )
110112
111- Minimal setup for zgui/ImGui .
113+ Basic usage of shaders compiled in build and embed to zig module .
112114
113115``` sh
114- examples/zig-out/bin/01-zgui
116+ examples/zig-out/bin/shader-embed
115117```
116118
117119| Key | Description |
118120| -----| --------------|
119121| ` v ` | Vsync on/off |
120122| ` d ` | Debug on/off |
121123
122- ### [ 02-Runtime shaderc ] ( examples/02 -runtime-shaderc / )
124+ ### [ Shader runtime ] ( examples/shader -runtime/ )
123125
124126Basic usage of shader compile in runtime.
125127Try edit shaders in ` zig-out/bin/shaders ` and hit ` r ` to recompile.
126128
127129``` sh
128- examples/zig-out/bin/02 -runtime-shaderc
130+ examples/zig-out/bin/shader -runtime
129131```
130132
131133| Key | Description |
@@ -134,12 +136,25 @@ examples/zig-out/bin/02-runtime-shaderc
134136| ` d ` | Debug on/off |
135137| ` r ` | Recompile shaders form file |
136138
137- ### [ 03-debugdraw] ( examples/03-debugdraw/ )
139+ ### [ ZGui] ( examples/zgui/ )
140+
141+ Minimal setup for zgui/ImGui.
142+
143+ ``` sh
144+ examples/zig-out/bin/zgui
145+ ```
146+
147+ | Key | Description |
148+ | -----| --------------|
149+ | ` v ` | Vsync on/off |
150+ | ` d ` | Debug on/off |
151+
152+ ### [ debugdraw] ( examples/debugdraw/ )
138153
139154DebugDraw api usage example.
140155
141156``` sh
142- examples/zig-out/bin/03- debugdraw
157+ examples/zig-out/bin/debugdraw
143158```
144159
145160| Key | Description |
0 commit comments