Updated to the LWJGL3 backend for LibGDX to for controller connect / disconnect functionality and access to geometry shaders and I'd rather not go back. There used to be a "samples" field in the LWJGLApplicationConfiguration object for setting antialiasing, but it no longer exists in LWJGL3ApplicationConfiguration. (Oh, and I'm only targeting Desktop)
-
\$\begingroup\$ Not sure what you're talking about, there is a samples field github.com/libgdx/libgdx/blob/master/backends/… \$\endgroup\$– BálintMar 17, 2017 at 21:11
-
\$\begingroup\$ Ah, it does indeed exist but is package private, so can't be modified directly. \$\endgroup\$– Okinawa TerminalMar 17, 2017 at 21:29
-
\$\begingroup\$ You shouldn't but you can. You even said the keyword, "package private". You can just create a wrapper and put it in the same package. You can also use reflection and stuff. Though in this case, there's a setter for it. \$\endgroup\$– BálintMar 17, 2017 at 21:45
1 Answer
Use setBackBufferConfig
on the LWJGL3ApplicationConfig. The last parameter is the amount of samples.
public void setBackBufferConfig(int r, int g, int b, int a, int depth, int stencil, int samples)