Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit 9b9dec4

Browse files
jan-brJanrupf
authored andcommitted
fix example
1 parent d961dbd commit 9b9dec4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

example/example-base/src/main/java/com/labymedia/ultralight/example/base/UltralightExampleBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private void setupNatives() throws UltralightLoadException {
7979
// correct order. If you want to manually load all natives, either don't use this function or pass 'false' as
8080
// the second parameter.
8181
UltralightJava.load(nativesDir);
82-
UltralightGPUDriverNativeUtil.extractNativeLibrary(nativesDir);
82+
UltralightGPUDriverNativeUtil.extractAndLoadNativeLibraries(nativesDir);
8383

8484
}
8585

example/lwjgl3-opengl/simple/src/main/java/com/labymedia/ultralight/example/simple/SimpleUltralightExample.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public void configure(UltralightExampleConfiguration ultralightExampleConfigurat
5252
);
5353
context.getPlatform().usePlatformFontLoader();
5454
});
55-
context.getMainWindow().show();
5655
}
5756

5857
@Override
@@ -84,7 +83,7 @@ public void begin() {
8483

8584
System.out.println(context.getMainWindow().getView().getDeviceScale());
8685
GL.createCapabilities();
87-
while (true){
86+
while (!GLFW.glfwWindowShouldClose(minecraftWindow)){
8887
GLFW.glfwMakeContextCurrent(minecraftWindow);
8988
GLFW.glfwPollEvents();
9089

@@ -120,7 +119,9 @@ public void begin() {
120119

121120
GLFW.glfwSwapBuffers(minecraftWindow);
122121
}
122+
GLFW.glfwDestroyWindow(minecraftWindow);
123123

124+
System.exit(0);
124125

125126
}
126127

0 commit comments

Comments
 (0)