This commit is contained in:
khanhduytran0 2021-11-09 19:47:10 +07:00
parent cd4fc36261
commit 91296a9826
2 changed files with 5 additions and 2 deletions

View File

@ -1019,10 +1019,13 @@ public class GLFW
} }
// GLFW Window functions // 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) { public static long glfwCreateWindow(int width, int height, CharSequence title, long monitor, long share) {
EventLoop.OffScreen.check(); EventLoop.OffScreen.check();
// Create an ACTUAL EGL context // Create an ACTUAL EGL context
long ptr = invokePP(window, Functions.CreateContext); long ptr = nglfwCreateContext(share);
//nativeEglMakeCurrent(ptr); //nativeEglMakeCurrent(ptr);
GLFWWindowProperties win = new GLFWWindowProperties(); GLFWWindowProperties win = new GLFWWindowProperties();
// win.width = width; // win.width = width;

View File

@ -131,7 +131,7 @@ final class ContextGL implements Context {
if(shared_context != null) { if(shared_context != null) {
share = shared_context.handle; 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); // implementation.create(peer_info, attribList, shared_context != null ? shared_context.handle : null);
/* } catch (LWJGLException e) { /* } catch (LWJGLException e) {
// GLContext.unloadOpenGLLibrary(); // GLContext.unloadOpenGLLibrary();