A few buildscript and test tweaks (#281)

* Kotlin buildscript for better IDE integration

* Fix transitive Bauble dep, move CoreTweaks to a fake-ivy dependency

* Don't scan fullscreen modes for window creation

* Update GTNHGradle
This commit is contained in:
Raven Szewczyk authored and GitHub committed 2024-02-11 05:24:08 -08:00
1 parent da9d6bad56
commit 74e6c80aad
7 files changed
+45 -46

No files matched your search

@@ -32,8 +32,9 @@ public class AngelicaExtension implements BeforeAllCallback, AfterEachCallback,
if (!started) {
started = true;
displayMode = findDisplayMode(800, 600, Display.getDisplayMode().getBitsPerPixel());
displayMode = new DisplayMode(800, 600);
Display.setDisplayModeAndFullscreen(displayMode);
Display.setResizable(false);
Display.setFullscreen(false);
final PixelFormat format = new PixelFormat().withDepthBits(24);
Display.create(format);
@@ -61,16 +62,6 @@ public class AngelicaExtension implements BeforeAllCallback, AfterEachCallback,
Display.destroy();
}
private static DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException {
final DisplayMode[] modes = Display.getAvailableDisplayModes();
for ( DisplayMode mode : modes ) {
if ( mode.getWidth() == width && mode.getHeight() == height && mode.getBitsPerPixel() >= bpp && mode.getFrequency() <= 60 ) {
return mode;
}
}
return Display.getDesktopDisplayMode();
}
@Override
public void afterEach(ExtensionContext context) throws Exception {
assertEquals(GL11.GL_NO_ERROR, GL11.glGetError(), "GL Error");