|
30 | 30 | import java.util.concurrent.*; |
31 | 31 | import java.util.function.Consumer; |
32 | 32 |
|
33 | | -import static org.lwjgl.glfw.GLFW.glfwInit; |
34 | 33 | import static org.lwjgl.opengl.GL.createCapabilities; |
35 | 34 |
|
36 | 35 | /** |
@@ -63,16 +62,17 @@ private UltralightGlfwOpenGLContext(int mainWindowWidth, int mainWindowHeight, S |
63 | 62 | this.driver = driver; |
64 | 63 | this.thread = new UltralightThread(); |
65 | 64 | this.subWindows = new HashSet<>(); |
66 | | - this.postAndWait(() -> initialize(mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow)); |
| 65 | + initialize(mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow); |
67 | 66 | } |
68 | 67 |
|
69 | 68 | private void initialize(int mainWindowWidth, int mainWindowHeight, String mainWindowTitle, long parentWindow) { |
70 | | - glfwInit(); |
71 | 69 | this.mainWindow = UltralightGlfwOpenGLWindow.create(this, mainWindowWidth, mainWindowHeight, mainWindowTitle, parentWindow); |
72 | | - this.mainWindow.makeContext(); |
73 | | - createCapabilities(); |
74 | | - this.platform = UltralightPlatform.instance(); |
75 | | - this.driver.initialise(this); |
| 70 | + this.postAndWait(() -> { |
| 71 | + this.mainWindow.makeContext(); |
| 72 | + createCapabilities(); |
| 73 | + this.platform = UltralightPlatform.instance(); |
| 74 | + this.driver.initialize(this); |
| 75 | + }); |
76 | 76 | } |
77 | 77 |
|
78 | 78 | /** |
@@ -203,7 +203,7 @@ public UltralightGlfwOpenGLContext updateJavaScript() { |
203 | 203 | * @param window the window to render |
204 | 204 | * @return this |
205 | 205 | * @see UltralightOpenGLGPUDriver#renderTexture(UltralightGlfwOpenGLWindow) |
206 | | - * @see UltralightOpenGLGPUDriver#initialise(UltralightGlfwOpenGLContext) |
| 206 | + * @see UltralightOpenGLGPUDriver#initialize(UltralightGlfwOpenGLContext) |
207 | 207 | * @see UltralightPlatform#setGPUDriver(UltralightGPUDriverNative) |
208 | 208 | * @see UltralightPlatform#setGPUDriver(UltralightGPUDriver) |
209 | 209 | * @see UltralightPlatform#setGPUDriverPointer(long) |
|
0 commit comments