Код: Выделить всё
[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)
OS: Arch Linux (6.12.9-arch-1)
Композитор: hyprland (Wayland)
gpu. 3070
Driver Version: 565.77
LWJGL Version: 3.3.6
EGL Version: 1.5
Reproduce
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);
}
}
< /code>
lwjgl < /strong> < /p>
использовал импорт отсюда (стабильный 3.3.6 linux x86, full) < /p>
ps < /prong>
i попробовал vkcube, glx, glx, lelender, vlender, lelenden winit in rust - все работало нормально.
Подробнее здесь: https://stackoverflow.com/questions/793 ... text-error