From 91296a9826c81453f1d2276ce5a816f21d7bb40c Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Tue, 9 Nov 2021 19:47:10 +0700 Subject: [PATCH] fix --- jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java | 5 ++++- jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/ContextGL.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java index bc7ba98fd..aa9a9361a 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -1019,10 +1019,13 @@ public class GLFW } // GLFW Window functions + public static long nglfwCreateContext(long share) { + return invokePP(share, Functions.CreateContext); + } public static long glfwCreateWindow(int width, int height, CharSequence title, long monitor, long share) { EventLoop.OffScreen.check(); // Create an ACTUAL EGL context - long ptr = invokePP(window, Functions.CreateContext); + long ptr = nglfwCreateContext(share); //nativeEglMakeCurrent(ptr); GLFWWindowProperties win = new GLFWWindowProperties(); // win.width = width; diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/ContextGL.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/ContextGL.java index 23193afda..d3bc0e1cf 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/ContextGL.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/ContextGL.java @@ -131,7 +131,7 @@ final class ContextGL implements Context { if(shared_context != null) { share = shared_context.handle; } - this.handle = GLFW.nativeEglCreateContext(share); + this.handle = GLFW.nglfwCreateContext(share); // implementation.create(peer_info, attribList, shared_context != null ? shared_context.handle : null); /* } catch (LWJGLException e) { // GLContext.unloadOpenGLLibrary();