Skip to content

AWT can't be used with LWJGL3 on MacOS X #5

Closed
@krukhlis

Description

@krukhlis

As continuation of the
#4

After I've passed the corresponding param to jvm via modified run task, Mundus editor has successfully started. But when I've tried WSAD keys to move my camera around -- the Mundus window has disappeared( but the process wasn't killed). I had 3 retries with the same result. So I've tried to figure out and it seems that the statement from GLFW in exception covers the reason:

Please run the JVM with -XstartOnFirstThread and
make sure a window toolkit other than GLFW (e.g. AWT or JavaFX) is not initialized.
at org.lwjgl.glfw.EventLoop

I have added jvmArgs "-Djava.awt.headless=true" to the run task extended in #4
and had to remove the GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); from com.mbrlabs.mundus.Main because it throws exception in headless mode.

After such set of changes everything works like a charm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions