use of com.badlogic.gdx.backends.headless.HeadlessApplication in project Mindustry by Anuken.
the class ServerLauncher method main.
public static void main(String[] args) throws Exception {
Net.setClientProvider(new KryoClient());
Net.setServerProvider(new KryoServer());
new HeadlessApplication(new MindustryServer());
// find and handle uncaught exceptions in libGDX thread
for (Thread thread : Thread.getAllStackTraces().keySet()) {
if (thread.getName().equals("HeadlessApplication")) {
thread.setUncaughtExceptionHandler((t, throwable) -> {
throwable.printStackTrace();
System.exit(-1);
});
break;
}
}
}
use of com.badlogic.gdx.backends.headless.HeadlessApplication in project ProjektGG by eskalon.
the class LibgdxUnitTest method init.
@BeforeAll
public static void init() {
application = new HeadlessApplication(new ApplicationAdapter() {
});
// Use Mockito to mock the OpenGL methods since we are running
// headlessly
Gdx.gl20 = Mockito.mock(GL20.class);
Gdx.gl = Gdx.gl20;
}
use of com.badlogic.gdx.backends.headless.HeadlessApplication in project ProjektGG by eskalon.
the class LibgdxUnitTest method init.
@BeforeAll
public static void init() {
application = new HeadlessApplication(new ApplicationAdapter() {
});
// Use Mockito to mock the OpenGL methods since we are running
// headlessly
Gdx.gl20 = Mockito.mock(GL20.class);
Gdx.gl = Gdx.gl20;
}
Aggregations