Skip to content

Commit 89ee757

Browse files
committed
fix: fix the canvas tearing problem with lwjglx.
1 parent e1851f6 commit 89ee757

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2023 jMonkeyEngine
2+
* Copyright (c) 2009-2026 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -239,7 +239,7 @@ private void destroyInThread() {
239239
@Override
240240
public void setSettings(AppSettings settings) {
241241
this.settings.copyFrom(settings);
242-
this.settings.setRenderer(AppSettings.LWJGL_OPENGL2);
242+
this.settings.setRenderer(AppSettings.LWJGL_OPENGL32);
243243
if (actualContext != null) {
244244
actualContext.setSettings(settings);
245245
}

jme3-examples/src/main/java/jme3test/awt/TestCanvas.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2021 jMonkeyEngine
2+
* Copyright (c) 2009-2026 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without

jme3-examples/src/main/java/jme3test/awt/TestSafeCanvas.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class TestSafeCanvas extends SimpleApplication {
1515

1616
public static void main(String[] args) throws InterruptedException{
1717
AppSettings settings = new AppSettings(true);
18+
settings.setX11PlatformPreferred(true);
19+
settings.setRenderer(AppSettings.LWJGL_OPENGL32);
1820
settings.setWidth(640);
1921
settings.setHeight(480);
2022

jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ public Canvas getCanvas() {
10671067
public void setSettings(AppSettings settings) {
10681068
if (settings.getRenderer().equals(AppSettings.ANGLE_GLES3)) {
10691069
StringBuilder buffer = new StringBuilder();
1070-
buffer.append("LWJGX is not compatible with ANGLE/SDL or GLES, as it only supports the following:")
1070+
buffer.append("LWJGLX is not compatible with ANGLE/SDL or GLES, as it only supports the following:")
10711071
.append('\n').append(" * WGL | Windows")
10721072
.append('\n').append(" * GLX | Linux (X11/XWayland)")
10731073
.append('\n').append(" * CGL | MacOsX")

0 commit comments

Comments
 (0)