diff --git a/app_pojavlauncher/src/main/jniLibs/arm64-v8a/libgl4es_114.so b/app_pojavlauncher/src/main/jniLibs/arm64-v8a/libgl4es_114.so index dcc5c5042..55b12ea1b 100644 Binary files a/app_pojavlauncher/src/main/jniLibs/arm64-v8a/libgl4es_114.so and b/app_pojavlauncher/src/main/jniLibs/arm64-v8a/libgl4es_114.so differ diff --git a/app_pojavlauncher/src/main/jniLibs/armeabi-v7a/libgl4es_114.so b/app_pojavlauncher/src/main/jniLibs/armeabi-v7a/libgl4es_114.so index 288ac1d81..b20d536e4 100644 Binary files a/app_pojavlauncher/src/main/jniLibs/armeabi-v7a/libgl4es_114.so and b/app_pojavlauncher/src/main/jniLibs/armeabi-v7a/libgl4es_114.so differ diff --git a/app_pojavlauncher/src/main/jniLibs/x86/libgl4es_114.so b/app_pojavlauncher/src/main/jniLibs/x86/libgl4es_114.so index c67f6b812..7552da8f4 100644 Binary files a/app_pojavlauncher/src/main/jniLibs/x86/libgl4es_114.so and b/app_pojavlauncher/src/main/jniLibs/x86/libgl4es_114.so differ diff --git a/app_pojavlauncher/src/main/jniLibs/x86_64/libgl4es_114.so b/app_pojavlauncher/src/main/jniLibs/x86_64/libgl4es_114.so index 4a800c882..5ee9b6d64 100644 Binary files a/app_pojavlauncher/src/main/jniLibs/x86_64/libgl4es_114.so and b/app_pojavlauncher/src/main/jniLibs/x86_64/libgl4es_114.so differ diff --git a/jre_lwjgl3glfw/build.gradle b/jre_lwjgl3glfw/build.gradle index c9d18cd5f..57ce98e4f 100644 --- a/jre_lwjgl3glfw/build.gradle +++ b/jre_lwjgl3glfw/build.gradle @@ -11,7 +11,6 @@ jar { //baseName = project.name baseName = "lwjgl-glfw-classes" destinationDirectory.set(file("../app_pojavlauncher/src/main/assets/components/lwjgl3/")) - // Auto update the version with a timestamp so the project jar gets updated by Pojav File versionFile = file("../app_pojavlauncher/src/main/assets/components/lwjgl3/version") versionFile.write(String.valueOf(new Date().getTime())) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java index c6feeb53a..f2e4cf948 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java @@ -199,8 +199,45 @@ public class GLFWImage extends Struct implements NativeResource { public static GLFWImage.Buffer createSafe(long address, int capacity) { return address == NULL ? null : wrap(Buffer.class, address, capacity); } + /** + * Returns a new {@code GLFWImage} instance allocated on the specified {@link MemoryStack}. + * + * @param stack the stack from which to allocate + */ + public static GLFWImage malloc(MemoryStack stack) { + return wrap(GLFWImage.class, stack.nmalloc(ALIGNOF, SIZEOF)); + } - // ----------------------------------- + /** + * Returns a new {@code GLFWImage} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. + * + * @param stack the stack from which to allocate + */ + public static GLFWImage calloc(MemoryStack stack) { + return wrap(GLFWImage.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); + } + + /** + * Returns a new {@link GLFWImage.Buffer} instance allocated on the specified {@link MemoryStack}. + * + * @param stack the stack from which to allocate + * @param capacity the buffer capacity + */ + public static GLFWImage.Buffer malloc(int capacity, MemoryStack stack) { + return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); + } + + /** + * Returns a new {@link GLFWImage.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. + * + * @param stack the stack from which to allocate + * @param capacity the buffer capacity + */ + public static GLFWImage.Buffer calloc(int capacity, MemoryStack stack) { + return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); + } + + // mallocStack() and callocStack() will be removed in 3.4.0. Keeping them here for compatibility. /** Returns a new {@code GLFWImage} instance allocated on the thread-local {@link MemoryStack}. */ public static GLFWImage mallocStack() { @@ -218,7 +255,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param stack the stack from which to allocate */ public static GLFWImage mallocStack(MemoryStack stack) { - return wrap(GLFWImage.class, stack.nmalloc(ALIGNOF, SIZEOF)); + return malloc(stack); } /** @@ -227,7 +264,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param stack the stack from which to allocate */ public static GLFWImage callocStack(MemoryStack stack) { - return wrap(GLFWImage.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); + return calloc(stack); } /** @@ -255,7 +292,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param capacity the buffer capacity */ public static GLFWImage.Buffer mallocStack(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); + return malloc(capacity, stack); } /** @@ -265,7 +302,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param capacity the buffer capacity */ public static GLFWImage.Buffer callocStack(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); + return calloc(capacity, stack); } // ----------------------------------- @@ -364,4 +401,4 @@ public class GLFWImage extends Struct implements NativeResource { } -} \ No newline at end of file +}