diff --git a/modules/lwjgl/bgfx/src/generated/java/org/lwjgl/bgfx/BGFX.java b/modules/lwjgl/bgfx/src/generated/java/org/lwjgl/bgfx/BGFX.java index 4f930eca42..a8b08c5c9a 100644 --- a/modules/lwjgl/bgfx/src/generated/java/org/lwjgl/bgfx/BGFX.java +++ b/modules/lwjgl/bgfx/src/generated/java/org/lwjgl/bgfx/BGFX.java @@ -1169,9 +1169,9 @@ public static void bgfx_attachment_init(@NativeType("bgfx_attachment_t *") BGFXA // --- [ bgfx_vertex_decl_begin ] --- /** Unsafe version of: {@link #bgfx_vertex_decl_begin vertex_decl_begin} */ - public static void nbgfx_vertex_decl_begin(long _decl, int _renderer) { + public static long nbgfx_vertex_decl_begin(long _decl, int _renderer) { long __functionAddress = Functions.vertex_decl_begin; - invokePV(_decl, _renderer, __functionAddress); + return invokePP(_decl, _renderer, __functionAddress); } /** @@ -1180,16 +1180,19 @@ public static void nbgfx_vertex_decl_begin(long _decl, int _renderer) { * @param _decl the vertex declaration * @param _renderer the renderer type. One of:
{@link #BGFX_RENDERER_TYPE_NOOP RENDERER_TYPE_NOOP}{@link #BGFX_RENDERER_TYPE_DIRECT3D9 RENDERER_TYPE_DIRECT3D9}{@link #BGFX_RENDERER_TYPE_DIRECT3D11 RENDERER_TYPE_DIRECT3D11}{@link #BGFX_RENDERER_TYPE_DIRECT3D12 RENDERER_TYPE_DIRECT3D12}
{@link #BGFX_RENDERER_TYPE_GNM RENDERER_TYPE_GNM}{@link #BGFX_RENDERER_TYPE_METAL RENDERER_TYPE_METAL}{@link #BGFX_RENDERER_TYPE_NVN RENDERER_TYPE_NVN}{@link #BGFX_RENDERER_TYPE_OPENGLES RENDERER_TYPE_OPENGLES}
{@link #BGFX_RENDERER_TYPE_OPENGL RENDERER_TYPE_OPENGL}{@link #BGFX_RENDERER_TYPE_VULKAN RENDERER_TYPE_VULKAN}{@link #BGFX_RENDERER_TYPE_COUNT RENDERER_TYPE_COUNT}
*/ - public static void bgfx_vertex_decl_begin(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("bgfx_renderer_type_t") int _renderer) { - nbgfx_vertex_decl_begin(_decl.address(), _renderer); + @Nullable + @NativeType("bgfx_vertex_decl_t *") + public static BGFXVertexDecl bgfx_vertex_decl_begin(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("bgfx_renderer_type_t") int _renderer) { + long __result = nbgfx_vertex_decl_begin(_decl.address(), _renderer); + return BGFXVertexDecl.createSafe(__result); } // --- [ bgfx_vertex_decl_add ] --- /** Unsafe version of: {@link #bgfx_vertex_decl_add vertex_decl_add} */ - public static void nbgfx_vertex_decl_add(long _decl, int _attrib, byte _num, int _type, boolean _normalized, boolean _asInt) { + public static long nbgfx_vertex_decl_add(long _decl, int _attrib, byte _num, int _type, boolean _normalized, boolean _asInt) { long __functionAddress = Functions.vertex_decl_add; - invokePV(_decl, _attrib, _num, _type, _normalized, _asInt, __functionAddress); + return invokePP(_decl, _attrib, _num, _type, _normalized, _asInt, __functionAddress); } /** @@ -1206,8 +1209,11 @@ public static void nbgfx_vertex_decl_add(long _decl, int _attrib, byte _num, int * @param _asInt packaging rule for {@code vertexPack}, {@code vertexUnpack}, and {@code vertexConvert} for {@link #BGFX_ATTRIB_TYPE_UINT8 ATTRIB_TYPE_UINT8} and {@link #BGFX_ATTRIB_TYPE_INT16 ATTRIB_TYPE_INT16}. Unpacking * code must be implemented inside vertex shader. */ - public static void bgfx_vertex_decl_add(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("bgfx_attrib_t") int _attrib, @NativeType("uint8_t") int _num, @NativeType("bgfx_attrib_type_t") int _type, @NativeType("bool") boolean _normalized, @NativeType("bool") boolean _asInt) { - nbgfx_vertex_decl_add(_decl.address(), _attrib, (byte)_num, _type, _normalized, _asInt); + @Nullable + @NativeType("bgfx_vertex_decl_t *") + public static BGFXVertexDecl bgfx_vertex_decl_add(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("bgfx_attrib_t") int _attrib, @NativeType("uint8_t") int _num, @NativeType("bgfx_attrib_type_t") int _type, @NativeType("bool") boolean _normalized, @NativeType("bool") boolean _asInt) { + long __result = nbgfx_vertex_decl_add(_decl.address(), _attrib, (byte)_num, _type, _normalized, _asInt); + return BGFXVertexDecl.createSafe(__result); } // --- [ bgfx_vertex_decl_decode ] --- @@ -1260,9 +1266,9 @@ public static boolean bgfx_vertex_decl_has(@NativeType("bgfx_vertex_decl_t const // --- [ bgfx_vertex_decl_skip ] --- /** Unsafe version of: {@link #bgfx_vertex_decl_skip vertex_decl_skip} */ - public static void nbgfx_vertex_decl_skip(long _decl, byte _num) { + public static long nbgfx_vertex_decl_skip(long _decl, byte _num) { long __functionAddress = Functions.vertex_decl_skip; - invokePV(_decl, _num, __functionAddress); + return invokePP(_decl, _num, __functionAddress); } /** @@ -1271,8 +1277,11 @@ public static void nbgfx_vertex_decl_skip(long _decl, byte _num) { * @param _decl the vertex declaration * @param _num the number of bytes to skip */ - public static void bgfx_vertex_decl_skip(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("uint8_t") int _num) { - nbgfx_vertex_decl_skip(_decl.address(), (byte)_num); + @Nullable + @NativeType("bgfx_vertex_decl_t *") + public static BGFXVertexDecl bgfx_vertex_decl_skip(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("uint8_t") int _num) { + long __result = nbgfx_vertex_decl_skip(_decl.address(), (byte)_num); + return BGFXVertexDecl.createSafe(__result); } // --- [ bgfx_vertex_decl_end ] --- @@ -3915,12 +3924,14 @@ public static void bgfx_set_view_order(@NativeType("bgfx_view_id_t") int _id, @N /** * Begin submitting draw calls from thread. * + * @param _forThread explicitly request an encoder for a worker thread + * * @return an encoder for submitting draw calls from multiple threads */ @NativeType("struct bgfx_encoder_s *") - public static long bgfx_encoder_begin() { + public static long bgfx_encoder_begin(@NativeType("bool") boolean _forThread) { long __functionAddress = Functions.encoder_begin; - return invokeP(__functionAddress); + return invokeP(_forThread, __functionAddress); } // --- [ bgfx_encoder_end ] --- diff --git a/modules/lwjgl/bgfx/src/templates/kotlin/bgfx/templates/BGFX.kt b/modules/lwjgl/bgfx/src/templates/kotlin/bgfx/templates/BGFX.kt index 9a16c6a9b2..4c1f9640b7 100644 --- a/modules/lwjgl/bgfx/src/templates/kotlin/bgfx/templates/BGFX.kt +++ b/modules/lwjgl/bgfx/src/templates/kotlin/bgfx/templates/BGFX.kt @@ -789,7 +789,7 @@ RGBA16S MapToInt..uint8_t("_resolve", "resolve flags", "RESOLVE_\\w+") ) - void( + bgfx_vertex_decl_t.p( "vertex_decl_begin", "Start a vertex declaration.", @@ -797,7 +797,7 @@ RGBA16S bgfx_renderer_type_t("_renderer", "the renderer type", RendererType) ) - void( + bgfx_vertex_decl_t.p( "vertex_decl_add", """ Adds attribute to a vertex declaration. @@ -845,7 +845,7 @@ RGBA16S bgfx_attrib_t("_attr", "the attribute to query", Attrib) ) - void( + bgfx_vertex_decl_t.p( "vertex_decl_skip", "Skips {@code _num} bytes in vertex stream.", @@ -2022,6 +2022,8 @@ RGBA16S "encoder_begin", "Begin submitting draw calls from thread.", + bool("_forThread", "explicitly request an encoder for a worker thread"), + returnDoc = "an encoder for submitting draw calls from multiple threads" ) diff --git a/modules/lwjgl/core/src/generated/c/org_lwjgl_system_JNI.c b/modules/lwjgl/core/src/generated/c/org_lwjgl_system_JNI.c index 4f3bed2695..01c5e8c7ab 100644 --- a/modules/lwjgl/core/src/generated/c/org_lwjgl_system_JNI.c +++ b/modules/lwjgl/core/src/generated/c/org_lwjgl_system_JNI.c @@ -494,6 +494,13 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeP__SJ(JNIEnv *__env, jcl UNUSED_PARAMS(__env, clazz) return JavaCritical_org_lwjgl_system_JNI_invokeP__SJ(param0, __functionAddress); } +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_system_JNI_invokeP__ZJ(jboolean param0, jlong __functionAddress) { + return (jlong)((intptr_t (*) (jboolean))(intptr_t)__functionAddress)(param0); +} +JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeP__ZJ(JNIEnv *__env, jclass clazz, jboolean param0, jlong __functionAddress) { + UNUSED_PARAMS(__env, clazz) + return JavaCritical_org_lwjgl_system_JNI_invokeP__ZJ(param0, __functionAddress); +} JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_system_JNI_invokeP__IIJ(jint param0, jint param1, jlong __functionAddress) { return (jlong)((intptr_t (*) (jint, jint))(intptr_t)__functionAddress)(param0, param1); } @@ -515,6 +522,13 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__IJJ(JNIEnv *__env, j UNUSED_PARAMS(__env, clazz) return JavaCritical_org_lwjgl_system_JNI_invokePP__IJJ(param0, param1, __functionAddress); } +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_system_JNI_invokePP__JBJ(jlong param0, jbyte param1, jlong __functionAddress) { + return (jlong)((intptr_t (*) (intptr_t, jbyte))(intptr_t)__functionAddress)((intptr_t)param0, param1); +} +JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JBJ(JNIEnv *__env, jclass clazz, jlong param0, jbyte param1, jlong __functionAddress) { + UNUSED_PARAMS(__env, clazz) + return JavaCritical_org_lwjgl_system_JNI_invokePP__JBJ(param0, param1, __functionAddress); +} JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_system_JNI_invokePP__JDJ(jlong param0, jdouble param1, jlong __functionAddress) { return (jlong)((intptr_t (*) (intptr_t, jdouble))(intptr_t)__functionAddress)((intptr_t)param0, param1); } @@ -578,6 +592,13 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeJP__SSSBIJJ(JNIEnv *__en UNUSED_PARAMS(__env, clazz) return JavaCritical_org_lwjgl_system_JNI_invokeJP__SSSBIJJ(param0, param1, param2, param3, param4, param5, __functionAddress); } +JNIEXPORT jlong JNICALL CRITICAL(org_lwjgl_system_JNI_invokePP__JIBIZZJ)(jlong param0, jint param1, jbyte param2, jint param3, jboolean param4, jboolean param5, jlong __functionAddress) { + return (jlong)((intptr_t (*) (intptr_t, jint, jbyte, jint, jboolean, jboolean))(intptr_t)__functionAddress)((intptr_t)param0, param1, param2, param3, param4, param5); +} +JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JIBIZZJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jbyte param2, jint param3, jboolean param4, jboolean param5, jlong __functionAddress) { + UNUSED_PARAMS(__env, clazz) + return CRITICAL(org_lwjgl_system_JNI_invokePP__JIBIZZJ)(param0, param1, param2, param3, param4, param5, __functionAddress); +} JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_system_JNI_invokePJP__JJJ(jlong param0, jlong param1, jlong __functionAddress) { return (jlong)((intptr_t (*) (intptr_t, jlong))(intptr_t)__functionAddress)((intptr_t)param0, param1); } @@ -1572,13 +1593,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IJJ(JNIEnv *__env, jc UNUSED_PARAMS(__env, clazz) JavaCritical_org_lwjgl_system_JNI_invokePV__IJJ(param0, param1, __functionAddress); } -JNIEXPORT void JNICALL JavaCritical_org_lwjgl_system_JNI_invokePV__JBJ(jlong param0, jbyte param1, jlong __functionAddress) { - ((void (*) (intptr_t, jbyte))(intptr_t)__functionAddress)((intptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JBJ(JNIEnv *__env, jclass clazz, jlong param0, jbyte param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - JavaCritical_org_lwjgl_system_JNI_invokePV__JBJ(param0, param1, __functionAddress); -} JNIEXPORT void JNICALL JavaCritical_org_lwjgl_system_JNI_invokePV__JFJ(jlong param0, jfloat param1, jlong __functionAddress) { ((void (*) (intptr_t, jfloat))(intptr_t)__functionAddress)((intptr_t)param0, param1); } @@ -1768,13 +1782,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JBSIISJ(JNIEnv *__env UNUSED_PARAMS(__env, clazz) CRITICAL(org_lwjgl_system_JNI_invokePV__JBSIISJ)(param0, param1, param2, param3, param4, param5, __functionAddress); } -JNIEXPORT void JNICALL CRITICAL(org_lwjgl_system_JNI_invokePV__JIBIZZJ)(jlong param0, jint param1, jbyte param2, jint param3, jboolean param4, jboolean param5, jlong __functionAddress) { - ((void (*) (intptr_t, jint, jbyte, jint, jboolean, jboolean))(intptr_t)__functionAddress)((intptr_t)param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIBIZZJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jbyte param2, jint param3, jboolean param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - CRITICAL(org_lwjgl_system_JNI_invokePV__JIBIZZJ)(param0, param1, param2, param3, param4, param5, __functionAddress); -} JNIEXPORT void JNICALL CRITICAL(org_lwjgl_system_JNI_invokePV__JIIIIZJ)(jlong param0, jint param1, jint param2, jint param3, jint param4, jboolean param5, jlong __functionAddress) { ((void (*) (intptr_t, jint, jint, jint, jint, jboolean))(intptr_t)__functionAddress)((intptr_t)param0, param1, param2, param3, param4, param5); } diff --git a/modules/lwjgl/core/src/generated/java/org/lwjgl/system/JNI.java b/modules/lwjgl/core/src/generated/java/org/lwjgl/system/JNI.java index 98f15a6c50..aa54ceb240 100644 --- a/modules/lwjgl/core/src/generated/java/org/lwjgl/system/JNI.java +++ b/modules/lwjgl/core/src/generated/java/org/lwjgl/system/JNI.java @@ -107,9 +107,11 @@ private JNI() {} public static native long invokeP(long __functionAddress); public static native long invokeP(int param0, long __functionAddress); public static native long invokeP(short param0, long __functionAddress); + public static native long invokeP(boolean param0, long __functionAddress); public static native long invokeP(int param0, int param1, long __functionAddress); public static native long invokePP(long param0, long __functionAddress); public static native long invokePP(int param0, long param1, long __functionAddress); + public static native long invokePP(long param0, byte param1, long __functionAddress); public static native long invokePP(long param0, double param1, long __functionAddress); public static native long invokePP(long param0, int param1, long __functionAddress); public static native long invokePP(short param0, long param1, long __functionAddress); @@ -119,6 +121,7 @@ private JNI() {} public static native long invokePP(int param0, int param1, int param2, long param3, long __functionAddress); public static native long invokePP(long param0, int param1, int param2, int param3, long __functionAddress); public static native long invokeJP(short param0, short param1, short param2, byte param3, int param4, long param5, long __functionAddress); + public static native long invokePP(long param0, int param1, byte param2, int param3, boolean param4, boolean param5, long __functionAddress); public static native long invokePJP(long param0, long param1, long __functionAddress); public static native long invokePPP(long param0, long param1, long __functionAddress); public static native long invokePJP(long param0, int param1, long param2, long __functionAddress); @@ -261,7 +264,6 @@ private JNI() {} public static native void invokeJV(long param0, int param1, long __functionAddress); public static native void invokePV(byte param0, long param1, long __functionAddress); public static native void invokePV(int param0, long param1, long __functionAddress); - public static native void invokePV(long param0, byte param1, long __functionAddress); public static native void invokePV(long param0, float param1, long __functionAddress); public static native void invokePV(long param0, int param1, long __functionAddress); public static native void invokePV(long param0, short param1, long __functionAddress); @@ -289,7 +291,6 @@ private JNI() {} public static native void invokePV(long param0, short param1, short param2, int param3, boolean param4, long __functionAddress); public static native void invokePV(long param0, byte param1, short param2, byte param3, int param4, int param5, long __functionAddress); public static native void invokePV(long param0, byte param1, short param2, int param3, int param4, short param5, long __functionAddress); - public static native void invokePV(long param0, int param1, byte param2, int param3, boolean param4, boolean param5, long __functionAddress); public static native void invokePV(long param0, int param1, int param2, int param3, int param4, boolean param5, long __functionAddress); public static native void invokePV(long param0, short param1, int param2, short param3, short param4, byte param5, long __functionAddress); public static native void invokePV(long param0, short param1, short param2, int param3, int param4, int param5, long __functionAddress);