Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ddb431

Browse files
committed
monolith: fixups for zglfw changes & zig upgrade
1 parent43e5772 commit9ddb431

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎samples/monolith/build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
2929
constzgui=b.dependency("zgui", .{
3030
.target=options.target,
3131
.backend=.glfw_wgpu,
32+
.with_gizmo=true,
3233
});
3334
exe.root_module.addImport("zgui",zgui.module("root"));
3435
exe.linkLibrary(zgui.artifact("imgui"));

‎samples/monolith/src/monolith.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,15 @@ const DebugRenderer = struct {
496496
_:*DebugRenderer,
497497
_:*const [3]zphy.Real,
498498
_:*const [3]zphy.Real,
499-
_:*constzphy.DebugRenderer.Color,
499+
_:zphy.DebugRenderer.Color,
500500
)callconv(.C)void {}
501501

502502
fndrawTriangle(
503503
_:*DebugRenderer,
504504
_:*const [3]zphy.Real,
505505
_:*const [3]zphy.Real,
506506
_:*const [3]zphy.Real,
507-
_:*constzphy.DebugRenderer.Color,
507+
_:zphy.DebugRenderer.Color,
508508
)callconv(.C)void {}
509509

510510
fncreateTriangleBatch(_:*DebugRenderer,_: [*]zphy.DebugRenderer.Triangle,_:u32)callconv(.C)*anyopaque {
@@ -1068,15 +1068,15 @@ fn update(demo: *DemoState) void {
10681068

10691069
if (window.getMouseButton(.left)==.press) {
10701070
if (demo.mouse.captured) {
1071-
window.setInputMode(.cursor,zglfw.Cursor.Mode.normal);
1072-
window.setInputMode(.raw_mouse_motion,false);
1071+
window.setInputMode(.cursor,zglfw.Cursor.Mode.normal)catchunreachable;
1072+
window.setInputMode(.raw_mouse_motion,false)catchunreachable;
10731073
}
10741074
demo.mouse.captured=false;
10751075
}
10761076
if (window.getMouseButton(.right)==.press) {
10771077
if (!demo.mouse.captured) {
1078-
window.setInputMode(.cursor,zglfw.Cursor.Mode.disabled);
1079-
window.setInputMode(.raw_mouse_motion,true);
1078+
window.setInputMode(.cursor,zglfw.Cursor.Mode.disabled)catchunreachable;
1079+
window.setInputMode(.raw_mouse_motion,true)catchunreachable;
10801080
}
10811081
demo.mouse.captured=true;
10821082
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp