Skip to content

Commit cb5eb43

Browse files
committed
feat: enable anti-aliasing
1 parent b7d784b commit cb5eb43

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cake/lwjgl3/src/main/kotlin/org/demoth/cake/lwjgl3/Lwjgl3GameLauncher.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,21 @@ object Lwjgl3GameLauncher {
1919
private fun getDefaultConfiguration(): Lwjgl3ApplicationConfiguration {
2020
return Lwjgl3ApplicationConfiguration().apply {
2121
setTitle("cake-engine")
22+
setBackBufferConfig(
23+
/* r = */ 8,
24+
/* g = */ 8,
25+
/* b = */ 8,
26+
/* a = */ 8,
27+
/* depth = */ 24,
28+
/* stencil = */ 0,
29+
/* samples = */ 4 // anti-aliasing
30+
)
2231

2332
// todo: load displaymode from the configuration
2433
useVsync(true)
2534
setForegroundFPS(Lwjgl3ApplicationConfiguration.getDisplayMode().refreshRate)
2635
setResizable(false)
27-
setWindowedMode(640, 480)
36+
setWindowedMode(1200, 900)
2837
// setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode())
2938
setWindowIcon("libgdx128.png", "libgdx64.png", "libgdx32.png", "libgdx16.png")
3039
}

0 commit comments

Comments
 (0)