Skip to content

Commit a23f7fe

Browse files
authored
zgui update to dear imgui 1.91.8 (#740)
zgui D3d12 backend breaking change introduced by upgrade to Dear Imgui 1.91.8. See zig-gamedev/zgui#15
1 parent 23457ac commit a23f7fe

File tree

6 files changed

+43
-27
lines changed

6 files changed

+43
-27
lines changed

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
},
7878

7979
.zgui = .{
80-
.url = "https://github.com/zig-gamedev/zgui/archive/5fb1c3b935b311e88352b0ffee29e7ad56da9722.tar.gz",
81-
.hash = "12204f82e0475ddfd6a57d97f74bcf9052452c0eb2fa863cf0e3bce1071d2603e9f4",
80+
.url = "https://github.com/zig-gamedev/zgui/archive/6763f8a059efe96951700731a8a3efb8a99a8ceb.tar.gz",
81+
.hash = "1220c209784531fdf9eab84ca0a985adc98dc0b3c22fa477b54714036fe549b7eeb5",
8282
},
8383

8484
.zjobs = .{

libs/zgui

Submodule zgui updated 62 files

samples/minimal_zgui_glfw_d3d12/src/minimal_zgui_glfw_d3d12.zig

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,16 @@ pub fn main() !void {
6161
const cbv_srv = gctx.cbv_srv_uav_gpu_heaps[0];
6262
zgui.backend.init(
6363
glfw_window,
64-
gctx.device,
65-
zd3d12.GraphicsContext.max_num_buffered_frames,
66-
@intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
67-
cbv_srv.heap.?,
68-
@bitCast(cbv_srv.base.cpu_handle),
69-
@bitCast(cbv_srv.base.gpu_handle),
64+
.{
65+
.device = gctx.device,
66+
.command_queue = gctx.cmdqueue,
67+
.num_frames_in_flight = zd3d12.GraphicsContext.max_num_buffered_frames,
68+
.rtv_format = @intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
69+
.dsv_format = @intFromEnum(dxgi.FORMAT.D32_FLOAT),
70+
.cbv_srv_heap = cbv_srv.heap.?,
71+
.font_srv_cpu_desc_handle = @bitCast(cbv_srv.base.cpu_handle),
72+
.font_srv_gpu_desc_handle = @bitCast(cbv_srv.base.gpu_handle),
73+
},
7074
);
7175
}
7276
defer zgui.backend.deinit();

samples/minimal_zgui_win32_d3d12/src/minimal_zgui_win32_d3d12.zig

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ pub fn main() !void {
5252
const cbv_srv = gctx.cbv_srv_uav_gpu_heaps[0];
5353
zgui.backend.init(
5454
window,
55-
gctx.device,
56-
zd3d12.GraphicsContext.max_num_buffered_frames,
57-
@intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
58-
cbv_srv.heap.?,
59-
@bitCast(cbv_srv.base.cpu_handle),
60-
@bitCast(cbv_srv.base.gpu_handle),
55+
.{
56+
.device = gctx.device,
57+
.command_queue = gctx.cmdqueue,
58+
.num_frames_in_flight = zd3d12.GraphicsContext.max_num_buffered_frames,
59+
.rtv_format = @intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
60+
.dsv_format = @intFromEnum(dxgi.FORMAT.D32_FLOAT),
61+
.cbv_srv_heap = cbv_srv.heap.?,
62+
.font_srv_cpu_desc_handle = @bitCast(cbv_srv.base.cpu_handle),
63+
.font_srv_gpu_desc_handle = @bitCast(cbv_srv.base.gpu_handle),
64+
},
6165
);
6266
defer zgui.backend.deinit();
6367

samples/openvr_test/src/openvr_test.zig

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ const Surface = struct {
4747
const cbv_srv = gctx.cbv_srv_uav_gpu_heaps[0];
4848
zgui.backend.init(
4949
window,
50-
gctx.device,
51-
zd3d12.GraphicsContext.max_num_buffered_frames,
52-
@intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
53-
cbv_srv.heap.?,
54-
@bitCast(cbv_srv.base.cpu_handle),
55-
@bitCast(cbv_srv.base.gpu_handle),
50+
.{
51+
.device = gctx.device,
52+
.command_queue = gctx.cmdqueue,
53+
.num_frames_in_flight = zd3d12.GraphicsContext.max_num_buffered_frames,
54+
.rtv_format = @intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
55+
.dsv_format = @intFromEnum(dxgi.FORMAT.D32_FLOAT),
56+
.cbv_srv_heap = cbv_srv.heap.?,
57+
.font_srv_cpu_desc_handle = @bitCast(cbv_srv.base.cpu_handle),
58+
.font_srv_gpu_desc_handle = @bitCast(cbv_srv.base.gpu_handle),
59+
},
5660
);
5761
}
5862

samples/zphysics_instanced_cubes_d3d12/src/zphysics_instanced_cubes_d3d12.zig

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,16 @@ pub fn main() !void {
297297
const cbv_srv = gctx.cbv_srv_uav_gpu_heaps[0];
298298
zgui.backend.init(
299299
glfw_window,
300-
gctx.device,
301-
zd3d12.GraphicsContext.max_num_buffered_frames,
302-
@intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
303-
cbv_srv.heap.?,
304-
@bitCast(cbv_srv.base.cpu_handle),
305-
@bitCast(cbv_srv.base.gpu_handle),
300+
.{
301+
.device = gctx.device,
302+
.command_queue = gctx.cmdqueue,
303+
.num_frames_in_flight = zd3d12.GraphicsContext.max_num_buffered_frames,
304+
.rtv_format = @intFromEnum(dxgi.FORMAT.R8G8B8A8_UNORM),
305+
.dsv_format = @intFromEnum(dxgi.FORMAT.D32_FLOAT),
306+
.cbv_srv_heap = cbv_srv.heap.?,
307+
.font_srv_cpu_desc_handle = @bitCast(cbv_srv.base.cpu_handle),
308+
.font_srv_gpu_desc_handle = @bitCast(cbv_srv.base.gpu_handle),
309+
},
306310
);
307311
}
308312
defer zgui.backend.deinit();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy