0

ウィンドウのサイズが変更されたときに、ディスプレイの内容のサイズを変更しようとしています。これが私のコードです:

        if (Display.wasResized()) {
            this.width = Display.getWidth();
            this.height = Display.getHeight();

            GL11.glViewport(0, 0, this.width, this.height);
            GL11.glLoadIdentity();
            GL11.glMatrixMode(GL11.GL_PROJECTION);
            GL11.glLoadIdentity();
            GL11.glOrtho(0.0f, this.width, 0.0f, this.height, 1.0f, -1.0f);
            GL11.glMatrixMode(GL11.GL_MODELVIEW);
            GL11.glLoadIdentity();
        }

これを使用すると、ウィンドウのコンテンツのサイズは変更されず、原点に向かって移動するだけです。内容を実際にサイズ変更する方法はありますか?

4

1 に答える 1