From 936ab4e55ca5508b107fbcdab7fdaef24acd59d7 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Sat, 11 Feb 2023 21:57:09 +0000 Subject: [PATCH] Tell Minecraft the initial framebuffer size on window creation --- src/main/java/org/lwjglx/opengl/Display.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/lwjglx/opengl/Display.java b/src/main/java/org/lwjglx/opengl/Display.java index 91b8f54..eceaea0 100644 --- a/src/main/java/org/lwjglx/opengl/Display.java +++ b/src/main/java/org/lwjglx/opengl/Display.java @@ -319,6 +319,12 @@ public class Display { if (startFullscreen) { setFullscreen(true); } + + int[] x = new int[1], y = new int[1]; + GLFW.glfwGetWindowSize(Window.handle, x, y); + Window.windowSizeCallback.invoke(Window.handle, x[0], y[0]); + GLFW.glfwGetFramebufferSize(Window.handle, x, y); + Window.framebufferSizeCallback.invoke(Window.handle, x[0], y[0]); } public static boolean isCreated() {