简体   繁体   中英

Why am I unable to resize my GLWindow (resizing cursor doesn't even show up)?

I'm trying to learn OpenGL off a tutorial that uses JOGL to make a 2D game. My code is pretty much identical aside from a few name changes and better formatting but for some reason, unlike the person's from the tutorial, my window is not resizable.

// Main window class
public class Display
{
    private static GLWindow window = null;
    private static FPSAnimator fps;

    public Display()
    {
        GLProfile.initSingleton();
        GLProfile glp = GLProfile.get(GLProfile.GL2);
        GLCapabilities glc = new GLCapabilities(glp);
        window = GLWindow.create(glc);
        window.setSize(640, 320);
        window.setResizable(true);
        window.addGLEventListener(new GraphicListener());
        fps = new FPSAnimator(window, 60);
        fps.start();
        window.setVisible(true);
    }
}

It'll maximise and shrink just fine and I can drag it around, but even though I set it to be resizable, it's just not. The little resizing arrows that appear when touching the sides of any other window never even show up.

It should be resizable even though the resizing arrows don't show up. You just have to click very close to the edge.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM