lwjgl:当我调整 window 大小时,显示模式的大小不会改变。

lwjgl: Size of the display mode does not change when i re size the window.

我用这段代码创建了一个 window:

        Display.setDisplayMode(new DisplayMode(width, height));
        Display.setResizable(true);
        Display.create();

每个游戏循环我都会尝试获取 window 的大小:

        width = Display.getDisplayMode().getWidth();
        height = Display.getDisplayMode().getHeight();
        tick();
        render();
        otherStuff();
        Display.update();

现在我的问题出现了,因为 Display.getDisplayMode().getWidth(); 始终 returns window 的原始大小,并且即使我重新调整 window.[=14 的大小也不会改变=]

我需要在用户重新调整大小后获取 window 的新大小。有帮助吗?

Display.getWidth() and Display.getHeight() 随心所欲。