Skip to content

Commit a42bde8

Browse files
committed
backend_glfw_opengl: fixup newFrame
1 parent 4f4a9e2 commit a42bde8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/zgui/src/backend_glfw_opengl.zig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ pub fn deinit() void {
2222
ImGui_ImplOpenGL3_Shutdown();
2323
}
2424

25-
pub fn newFrame() void {
25+
pub fn newFrame(fb_width: u32, fb_height: u32) void {
2626
ImGui_ImplGlfw_NewFrame();
2727
ImGui_ImplOpenGL3_NewFrame();
2828

29+
gui.io.setDisplaySize(@as(f32, @floatFromInt(fb_width)), @as(f32, @floatFromInt(fb_height)));
30+
gui.io.setDisplayFramebufferScale(1.0, 1.0);
31+
2932
gui.newFrame();
3033
}
3134

0 commit comments

Comments
 (0)