Skip to content

LWJGL3 Window Utilities #1152

@louhy

Description

@louhy

Since this is purely aimed at conveniences, I can see opinion going either way on this, so checking interest before I bother with a PR.

Suggest an LwjglUtil class (for LWJGL3 only, since 2 already has this) which would have static methods for common window or display manipulation, something like this:

    public static int getWindowX(JmeContext context);
    public static int getWindowY(JmeContext context);
    public static void setWindowPosition(JmeContext context, int xPos, int yPos);

    public static int getWindowWidth(JmeContext context);
    public static int getWindowHeight(JmeContext context);
    public static void setWindowSize(JmeContext context, int width, int height);

    public static int getPrimaryMonitorWidth();
    public static int getPrimaryMonitorHeight();

LWJGL2 already has something like this in Display (ex. Display.setLocation()), but I don't believe 3 has a similar interface, and it looks a little more inconvenient to interact with (point me in the right direction if I'm missing something). This would be in jme3-lwjgl3, probably com.jme3.util.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions