Code: Select all
[LWJGL] GLFW_PLATFORM_ERROR error
Description :
EGL: Failed to clear current context:
An EGLDisplay argument does not name a valid EGL display connection
Stacktrace :
org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2086)
org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2251)
Betriebssystem: Arch Linux ( 6.12.9-arch-1)
Compositor: Hyprland (Wayland)
GPU:NVIDIA RTX 3070
Treiber Version: 565.77
LWJGL-Version: 3.3.6
EGL-Version: 1,5
Reproduzieren
Code: Select all
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import org.lwjgl.system.*;
import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
public class Game {
public static void main(String[] args) {
GLFWErrorCallback.createPrint(System.err).set();
if (!glfwInit())
throw new IllegalStateException("Unable to init GLFW");
glfwDefaultWindowHints();
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
long window = glfwCreateWindow(800, 600, "Test", NULL, NULL);
if (window == NULL)
throw new RuntimeException("glfwCreateWindow failed");
glfwMakeContextCurrent(window);
glfwSwapInterval(1);
glfwShowWindow(window);
}
}
Verwendete Importe von hier (stabil 3.3.6 Linux x86, voll)
PS
Ich habe versucht, vkcube, glxgears, weston und einen eigenen Vulkan-Renderer mit Winit in Rust auszuführen – Alles hat gut funktioniert.