From 6dab8955cd2968546c1600c3097e60d720fb6054 Mon Sep 17 00:00:00 2001 From: Paulo Feodrippe Date: Mon, 22 Jul 2024 17:47:38 -0400 Subject: [PATCH] wip4 --- bin/jextract-libs.sh | 42 +- bin/vybe_raylib.c | 73 ++- src-java/org/vybe/flecs/flecs_1.java | 4 +- src-java/org/vybe/raylib/raylib.java | 752 +++++++++++++-------------- 4 files changed, 459 insertions(+), 412 deletions(-) diff --git a/bin/jextract-libs.sh b/bin/jextract-libs.sh index d5c4cc5..72c7882 100755 --- a/bin/jextract-libs.sh +++ b/bin/jextract-libs.sh @@ -4,12 +4,42 @@ set -ex unameOut="$(uname -s)" case "${unameOut}" in - Linux*) VYBE_EXTENSION=so; __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; VYBE_GCC_FLECS_OPTS="-std=gnu99 -fPIC"; VYBE_GCC_END=""; VYBE_GCC_RAYLIB=""; VYBE_LIB_PREFIX="lib";; - Darwin*) VYBE_EXTENSION=dylib; __VYBE_DEFAULT_GCC_ARGS="gcc -undefined dynamic_lookup"; VYBE_GCC_FLECS_OPTS="-std=gnu99"; VYBE_GCC_END=""; VYBE_GCC_RAYLIB=""; VYBE_LIB_PREFIX="lib";; - CYGWIN*) VYBE_EXTENSION=dll; __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; VYBE_GCC_FLECS_OPTS="-std=gnu99"; VYBE_GCC_END="-lws2_32"; VYBE_GCC_RAYLIB="-static-libgcc -lopengl32 -lgdi32 -lwinmm"; VYBE_LIB_PREFIX="";; - MINGW*) VYBE_EXTENSION=dll; __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; VYBE_GCC_FLECS_OPTS="-std=gnu99"; VYBE_GCC_END="-lws2_32"; VYBE_GCC_RAYLIB="-static-libgcc -lopengl32 -lgdi32 -lwinmm"; VYBE_LIB_PREFIX="";; - MSYS_NT*) VYBE_EXTENSION=dll; __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; VYBE_GCC_FLECS_OPTS="-std=gnu99"; VYBE_GCC_END="-lws2_32"; VYBE_GCC_RAYLIB="-static-libgcc -lopengl32 -lgdi32 -lwinmm"; VYBE_LIB_PREFIX="";; - *) VYBE_EXTENSION="UNKNOWN:${unameOut}" + Linux*) + VYBE_EXTENSION=so; + __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; + VYBE_GCC_FLECS_OPTS="-std=gnu99 -fPIC"; VYBE_GCC_END=""; + VYBE_GCC_RAYLIB=""; + VYBE_LIB_PREFIX="lib";; + Darwin*) + VYBE_EXTENSION=dylib; + __VYBE_DEFAULT_GCC_ARGS="gcc -undefined dynamic_lookup"; + VYBE_GCC_FLECS_OPTS="-std=gnu99"; + VYBE_GCC_END=""; + VYBE_GCC_RAYLIB=""; + VYBE_LIB_PREFIX="lib";; + CYGWIN*) + VYBE_EXTENSION=dll; + __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; + VYBE_GCC_FLECS_OPTS="-std=gnu99"; + VYBE_GCC_END="-lws2_32"; + VYBE_GCC_RAYLIB="-lopengl32 -lgdi32 -lwinmm"; + VYBE_LIB_PREFIX="";; + MINGW*) + VYBE_EXTENSION=dll; + __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; + VYBE_GCC_FLECS_OPTS="-std=gnu99"; + VYBE_GCC_END="-lws2_32"; + VYBE_GCC_RAYLIB="-lopengl32 -lgdi32 -lwinmm"; + VYBE_LIB_PREFIX="";; + MSYS_NT*) + VYBE_EXTENSION=dll; + __VYBE_DEFAULT_GCC_ARGS="gcc -undefined"; + VYBE_GCC_FLECS_OPTS="-std=gnu99"; + VYBE_GCC_END="-lws2_32"; + VYBE_GCC_RAYLIB="-lopengl32 -lgdi32 -lwinmm"; + VYBE_LIB_PREFIX="";; + *) + VYBE_EXTENSION="UNKNOWN:${unameOut}" esac __VYBE_JEXTRACT_DEFAULT=~/Downloads/jextract-osx/bin/jextract diff --git a/bin/vybe_raylib.c b/bin/vybe_raylib.c index e3488c5..37c39c8 100644 --- a/bin/vybe_raylib.c +++ b/bin/vybe_raylib.c @@ -2,6 +2,51 @@ #include "../raylib/src/rlgl.h" #include "../raylib/src/raymath.h" +// FOR WINDOWS +#if defined(_WIN32) + +#define GLAD_MALLOC RL_MALLOC +#define GLAD_FREE RL_FREE + +#define GLAD_GL_IMPLEMENTATION +#include "external/glad.h" // GLAD extensions loading library, includes OpenGL headers + +#include "raylib.h" +#include "rlgl.h" +#include "raymath.h" + +#else +// OSX and LINUX +void *malloc(unsigned long size); +unsigned long strlen(const char *str); +char* strcpy(char* destination, const char* source); + +void glGetProgramiv( int program, + int pname, + int *params); +void glGetActiveUniform( int program, + int index, + int bufSize, + int *length, + int *size, + int *type, + char *name); + +void glGetActiveAttrib( int program, + int index, + int bufSize, + int *length, + int *size, + int *type, + char *name); +int glGetUniformLocation( int program, + const char *name); +int glGetAttribLocation( int program, + const char *name); + +#endif + + #define VY_GL_ACTIVE_UNIFORMS GL_ACTIVE_UNIFORMS #define VY_GL_ACTIVE_ATTRIBUTES GL_ACTIVE_ATTRIBUTES @@ -61,34 +106,6 @@ VyShaderParameters VyGlGetActiveParameters(int id); int VyGlGetActiveUniformsCount(int id); int VyGlGetActiveAttributesCount(int id); -void *malloc(unsigned long size); -unsigned long strlen(const char *str); -char* strcpy(char* destination, const char* source); - -void glGetProgramiv( int program, - int pname, - int *params); -void glGetActiveUniform( int program, - int index, - int bufSize, - int *length, - int *size, - int *type, - char *name); - -void glGetActiveAttrib( int program, - int index, - int bufSize, - int *length, - int *size, - int *type, - char *name); -int glGetUniformLocation( int program, - const char *name); -int glGetAttribLocation( int program, - const char *name); - - VyShaderParameters VyGlGetActiveParameters(int id) { int namelen = -1; diff --git a/src-java/org/vybe/flecs/flecs_1.java b/src-java/org/vybe/flecs/flecs_1.java index a481e0d..8830ea1 100644 --- a/src-java/org/vybe/flecs/flecs_1.java +++ b/src-java/org/vybe/flecs/flecs_1.java @@ -42839,13 +42839,13 @@ public static long __DARWIN_C_LEVEL() { } /** * {@snippet lang=c : - * #define __ASSERT_FILE_NAME "jextract$5349203350397059923.h" + * #define __ASSERT_FILE_NAME "jextract$10271739112655021310.h" * } */ public static MemorySegment __ASSERT_FILE_NAME() { class Holder { static final MemorySegment __ASSERT_FILE_NAME - = flecs.LIBRARY_ARENA.allocateFrom("jextract$5349203350397059923.h"); + = flecs.LIBRARY_ARENA.allocateFrom("jextract$10271739112655021310.h"); } return Holder.__ASSERT_FILE_NAME; } diff --git a/src-java/org/vybe/raylib/raylib.java b/src-java/org/vybe/raylib/raylib.java index 8fa35d1..7d6247b 100644 --- a/src-java/org/vybe/raylib/raylib.java +++ b/src-java/org/vybe/raylib/raylib.java @@ -40176,15 +40176,13 @@ public static int QuaternionEquals(MemorySegment p, MemorySegment q) { } } - private static class VyDrawModel { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - VyModel.layout(), - Vector3.layout(), - raylib.C_FLOAT, - Color.layout() + private static class malloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + raylib.C_POINTER, + raylib.C_LONG ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModel"); + public static final MemorySegment ADDR = raylib.findOrThrow("malloc"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40192,61 +40190,57 @@ private static class VyDrawModel { /** * Function descriptor for: * {@snippet lang=c : - * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) + * void *malloc(unsigned long size) * } */ - public static FunctionDescriptor VyDrawModel$descriptor() { - return VyDrawModel.DESC; + public static FunctionDescriptor malloc$descriptor() { + return malloc.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) + * void *malloc(unsigned long size) * } */ - public static MethodHandle VyDrawModel$handle() { - return VyDrawModel.HANDLE; + public static MethodHandle malloc$handle() { + return malloc.HANDLE; } /** * Address for: * {@snippet lang=c : - * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) + * void *malloc(unsigned long size) * } */ - public static MemorySegment VyDrawModel$address() { - return VyDrawModel.ADDR; + public static MemorySegment malloc$address() { + return malloc.ADDR; } /** * {@snippet lang=c : - * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) + * void *malloc(unsigned long size) * } */ - public static void VyDrawModel(MemorySegment vyModel, MemorySegment position, float scale, MemorySegment tint) { - var mh$ = VyDrawModel.HANDLE; + public static MemorySegment malloc(long size) { + var mh$ = malloc.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyDrawModel", vyModel, position, scale, tint); + traceDowncall("malloc", size); } - mh$.invokeExact(vyModel, position, scale, tint); + return (MemorySegment)mh$.invokeExact(size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyDrawModelEx { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - VyModel.layout(), - Vector3.layout(), - Vector3.layout(), - raylib.C_FLOAT, - Vector3.layout(), - Color.layout() + private static class strlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + raylib.C_LONG, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModelEx"); + public static final MemorySegment ADDR = raylib.findOrThrow("strlen"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40254,60 +40248,58 @@ private static class VyDrawModelEx { /** * Function descriptor for: * {@snippet lang=c : - * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) + * unsigned long strlen(const char *str) * } */ - public static FunctionDescriptor VyDrawModelEx$descriptor() { - return VyDrawModelEx.DESC; + public static FunctionDescriptor strlen$descriptor() { + return strlen.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) + * unsigned long strlen(const char *str) * } */ - public static MethodHandle VyDrawModelEx$handle() { - return VyDrawModelEx.HANDLE; + public static MethodHandle strlen$handle() { + return strlen.HANDLE; } /** * Address for: * {@snippet lang=c : - * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) + * unsigned long strlen(const char *str) * } */ - public static MemorySegment VyDrawModelEx$address() { - return VyDrawModelEx.ADDR; + public static MemorySegment strlen$address() { + return strlen.ADDR; } /** * {@snippet lang=c : - * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) + * unsigned long strlen(const char *str) * } */ - public static void VyDrawModelEx(MemorySegment vyModel, MemorySegment position, MemorySegment rotationAxis, float rotationAngle, MemorySegment scale, MemorySegment tint) { - var mh$ = VyDrawModelEx.HANDLE; + public static long strlen(MemorySegment str) { + var mh$ = strlen.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyDrawModelEx", vyModel, position, rotationAxis, rotationAngle, scale, tint); + traceDowncall("strlen", str); } - mh$.invokeExact(vyModel, position, rotationAxis, rotationAngle, scale, tint); + return (long)mh$.invokeExact(str); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyDrawModelExQuat { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - VyModel.layout(), - Vector3.layout(), - Vector4.layout(), - Vector3.layout(), - Color.layout() + private static class strcpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + raylib.C_POINTER, + raylib.C_POINTER, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModelExQuat"); + public static final MemorySegment ADDR = raylib.findOrThrow("strcpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40315,56 +40307,58 @@ private static class VyDrawModelExQuat { /** * Function descriptor for: * {@snippet lang=c : - * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) + * char *strcpy(char *destination, const char *source) * } */ - public static FunctionDescriptor VyDrawModelExQuat$descriptor() { - return VyDrawModelExQuat.DESC; + public static FunctionDescriptor strcpy$descriptor() { + return strcpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) + * char *strcpy(char *destination, const char *source) * } */ - public static MethodHandle VyDrawModelExQuat$handle() { - return VyDrawModelExQuat.HANDLE; + public static MethodHandle strcpy$handle() { + return strcpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) + * char *strcpy(char *destination, const char *source) * } */ - public static MemorySegment VyDrawModelExQuat$address() { - return VyDrawModelExQuat.ADDR; + public static MemorySegment strcpy$address() { + return strcpy.ADDR; } /** * {@snippet lang=c : - * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) + * char *strcpy(char *destination, const char *source) * } */ - public static void VyDrawModelExQuat(MemorySegment vyModel, MemorySegment position, MemorySegment quaternion, MemorySegment scale, MemorySegment tint) { - var mh$ = VyDrawModelExQuat.HANDLE; + public static MemorySegment strcpy(MemorySegment destination, MemorySegment source) { + var mh$ = strcpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyDrawModelExQuat", vyModel, position, quaternion, scale, tint); + traceDowncall("strcpy", destination, source); } - mh$.invokeExact(vyModel, position, quaternion, scale, tint); + return (MemorySegment)mh$.invokeExact(destination, source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyBeginMode3D { + private static class glGetProgramiv { public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - VyCamera.layout() + raylib.C_INT, + raylib.C_INT, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyBeginMode3D"); + public static final MemorySegment ADDR = raylib.findOrThrow("glGetProgramiv"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40372,57 +40366,62 @@ private static class VyBeginMode3D { /** * Function descriptor for: * {@snippet lang=c : - * void VyBeginMode3D(VyCamera camera) + * void glGetProgramiv(int program, int pname, int *params) * } */ - public static FunctionDescriptor VyBeginMode3D$descriptor() { - return VyBeginMode3D.DESC; + public static FunctionDescriptor glGetProgramiv$descriptor() { + return glGetProgramiv.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void VyBeginMode3D(VyCamera camera) + * void glGetProgramiv(int program, int pname, int *params) * } */ - public static MethodHandle VyBeginMode3D$handle() { - return VyBeginMode3D.HANDLE; + public static MethodHandle glGetProgramiv$handle() { + return glGetProgramiv.HANDLE; } /** * Address for: * {@snippet lang=c : - * void VyBeginMode3D(VyCamera camera) + * void glGetProgramiv(int program, int pname, int *params) * } */ - public static MemorySegment VyBeginMode3D$address() { - return VyBeginMode3D.ADDR; + public static MemorySegment glGetProgramiv$address() { + return glGetProgramiv.ADDR; } /** * {@snippet lang=c : - * void VyBeginMode3D(VyCamera camera) + * void glGetProgramiv(int program, int pname, int *params) * } */ - public static void VyBeginMode3D(MemorySegment camera) { - var mh$ = VyBeginMode3D.HANDLE; + public static void glGetProgramiv(int program, int pname, MemorySegment params) { + var mh$ = glGetProgramiv.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyBeginMode3D", camera); + traceDowncall("glGetProgramiv", program, pname, params); } - mh$.invokeExact(camera); + mh$.invokeExact(program, pname, params); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyQuaternionToAxisAngle { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_FLOAT, - Vector4.layout() + private static class glGetActiveUniform { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + raylib.C_INT, + raylib.C_INT, + raylib.C_INT, + raylib.C_POINTER, + raylib.C_POINTER, + raylib.C_POINTER, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyQuaternionToAxisAngle"); + public static final MemorySegment ADDR = raylib.findOrThrow("glGetActiveUniform"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40430,57 +40429,62 @@ private static class VyQuaternionToAxisAngle { /** * Function descriptor for: * {@snippet lang=c : - * float VyQuaternionToAxisAngle(Quaternion q) + * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static FunctionDescriptor VyQuaternionToAxisAngle$descriptor() { - return VyQuaternionToAxisAngle.DESC; + public static FunctionDescriptor glGetActiveUniform$descriptor() { + return glGetActiveUniform.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * float VyQuaternionToAxisAngle(Quaternion q) + * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static MethodHandle VyQuaternionToAxisAngle$handle() { - return VyQuaternionToAxisAngle.HANDLE; + public static MethodHandle glGetActiveUniform$handle() { + return glGetActiveUniform.HANDLE; } /** * Address for: * {@snippet lang=c : - * float VyQuaternionToAxisAngle(Quaternion q) + * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static MemorySegment VyQuaternionToAxisAngle$address() { - return VyQuaternionToAxisAngle.ADDR; + public static MemorySegment glGetActiveUniform$address() { + return glGetActiveUniform.ADDR; } /** * {@snippet lang=c : - * float VyQuaternionToAxisAngle(Quaternion q) + * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static float VyQuaternionToAxisAngle(MemorySegment q) { - var mh$ = VyQuaternionToAxisAngle.HANDLE; + public static void glGetActiveUniform(int program, int index, int bufSize, MemorySegment length, MemorySegment size, MemorySegment type, MemorySegment name) { + var mh$ = glGetActiveUniform.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyQuaternionToAxisAngle", q); + traceDowncall("glGetActiveUniform", program, index, bufSize, length, size, type, name); } - return (float)mh$.invokeExact(q); + mh$.invokeExact(program, index, bufSize, length, size, type, name); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyQuaternionToAxisVector { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - Vector3.layout(), - Vector4.layout() + private static class glGetActiveAttrib { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + raylib.C_INT, + raylib.C_INT, + raylib.C_INT, + raylib.C_POINTER, + raylib.C_POINTER, + raylib.C_POINTER, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyQuaternionToAxisVector"); + public static final MemorySegment ADDR = raylib.findOrThrow("glGetActiveAttrib"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40488,58 +40492,58 @@ private static class VyQuaternionToAxisVector { /** * Function descriptor for: * {@snippet lang=c : - * Vector3 VyQuaternionToAxisVector(Quaternion q) + * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static FunctionDescriptor VyQuaternionToAxisVector$descriptor() { - return VyQuaternionToAxisVector.DESC; + public static FunctionDescriptor glGetActiveAttrib$descriptor() { + return glGetActiveAttrib.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * Vector3 VyQuaternionToAxisVector(Quaternion q) + * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static MethodHandle VyQuaternionToAxisVector$handle() { - return VyQuaternionToAxisVector.HANDLE; + public static MethodHandle glGetActiveAttrib$handle() { + return glGetActiveAttrib.HANDLE; } /** * Address for: * {@snippet lang=c : - * Vector3 VyQuaternionToAxisVector(Quaternion q) + * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static MemorySegment VyQuaternionToAxisVector$address() { - return VyQuaternionToAxisVector.ADDR; + public static MemorySegment glGetActiveAttrib$address() { + return glGetActiveAttrib.ADDR; } /** * {@snippet lang=c : - * Vector3 VyQuaternionToAxisVector(Quaternion q) + * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) * } */ - public static MemorySegment VyQuaternionToAxisVector(SegmentAllocator allocator, MemorySegment q) { - var mh$ = VyQuaternionToAxisVector.HANDLE; + public static void glGetActiveAttrib(int program, int index, int bufSize, MemorySegment length, MemorySegment size, MemorySegment type, MemorySegment name) { + var mh$ = glGetActiveAttrib.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyQuaternionToAxisVector", allocator, q); + traceDowncall("glGetActiveAttrib", program, index, bufSize, length, size, type, name); } - return (MemorySegment)mh$.invokeExact(allocator, q); + mh$.invokeExact(program, index, bufSize, length, size, type, name); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyGetScreenToWorldRay { + private static class glGetUniformLocation { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - Ray.layout(), - Vector2.layout(), - VyCamera.layout() + raylib.C_INT, + raylib.C_INT, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyGetScreenToWorldRay"); + public static final MemorySegment ADDR = raylib.findOrThrow("glGetUniformLocation"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40547,60 +40551,58 @@ private static class VyGetScreenToWorldRay { /** * Function descriptor for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) + * int glGetUniformLocation(int program, const char *name) * } */ - public static FunctionDescriptor VyGetScreenToWorldRay$descriptor() { - return VyGetScreenToWorldRay.DESC; + public static FunctionDescriptor glGetUniformLocation$descriptor() { + return glGetUniformLocation.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) + * int glGetUniformLocation(int program, const char *name) * } */ - public static MethodHandle VyGetScreenToWorldRay$handle() { - return VyGetScreenToWorldRay.HANDLE; + public static MethodHandle glGetUniformLocation$handle() { + return glGetUniformLocation.HANDLE; } /** * Address for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) + * int glGetUniformLocation(int program, const char *name) * } */ - public static MemorySegment VyGetScreenToWorldRay$address() { - return VyGetScreenToWorldRay.ADDR; + public static MemorySegment glGetUniformLocation$address() { + return glGetUniformLocation.ADDR; } /** * {@snippet lang=c : - * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) + * int glGetUniformLocation(int program, const char *name) * } */ - public static MemorySegment VyGetScreenToWorldRay(SegmentAllocator allocator, MemorySegment position, MemorySegment camera) { - var mh$ = VyGetScreenToWorldRay.HANDLE; + public static int glGetUniformLocation(int program, MemorySegment name) { + var mh$ = glGetUniformLocation.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyGetScreenToWorldRay", allocator, position, camera); + traceDowncall("glGetUniformLocation", program, name); } - return (MemorySegment)mh$.invokeExact(allocator, position, camera); + return (int)mh$.invokeExact(program, name); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyGetScreenToWorldRayEx { + private static class glGetAttribLocation { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - Ray.layout(), - Vector2.layout(), - VyCamera.layout(), raylib.C_INT, - raylib.C_INT + raylib.C_INT, + raylib.C_POINTER ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyGetScreenToWorldRayEx"); + public static final MemorySegment ADDR = raylib.findOrThrow("glGetAttribLocation"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40608,57 +40610,59 @@ private static class VyGetScreenToWorldRayEx { /** * Function descriptor for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) + * int glGetAttribLocation(int program, const char *name) * } */ - public static FunctionDescriptor VyGetScreenToWorldRayEx$descriptor() { - return VyGetScreenToWorldRayEx.DESC; + public static FunctionDescriptor glGetAttribLocation$descriptor() { + return glGetAttribLocation.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) + * int glGetAttribLocation(int program, const char *name) * } */ - public static MethodHandle VyGetScreenToWorldRayEx$handle() { - return VyGetScreenToWorldRayEx.HANDLE; + public static MethodHandle glGetAttribLocation$handle() { + return glGetAttribLocation.HANDLE; } /** * Address for: * {@snippet lang=c : - * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) + * int glGetAttribLocation(int program, const char *name) * } */ - public static MemorySegment VyGetScreenToWorldRayEx$address() { - return VyGetScreenToWorldRayEx.ADDR; + public static MemorySegment glGetAttribLocation$address() { + return glGetAttribLocation.ADDR; } /** * {@snippet lang=c : - * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) + * int glGetAttribLocation(int program, const char *name) * } */ - public static MemorySegment VyGetScreenToWorldRayEx(SegmentAllocator allocator, MemorySegment position, MemorySegment camera, int width, int height) { - var mh$ = VyGetScreenToWorldRayEx.HANDLE; + public static int glGetAttribLocation(int program, MemorySegment name) { + var mh$ = glGetAttribLocation.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyGetScreenToWorldRayEx", allocator, position, camera, width, height); + traceDowncall("glGetAttribLocation", program, name); } - return (MemorySegment)mh$.invokeExact(allocator, position, camera, width, height); + return (int)mh$.invokeExact(program, name); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyGlGetActiveParameters { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - VyShaderParameters.layout(), - raylib.C_INT + private static class VyDrawModel { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + VyModel.layout(), + Vector3.layout(), + raylib.C_FLOAT, + Color.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveParameters"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModel"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40666,57 +40670,61 @@ private static class VyGlGetActiveParameters { /** * Function descriptor for: * {@snippet lang=c : - * VyShaderParameters VyGlGetActiveParameters(int id) + * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) * } */ - public static FunctionDescriptor VyGlGetActiveParameters$descriptor() { - return VyGlGetActiveParameters.DESC; + public static FunctionDescriptor VyDrawModel$descriptor() { + return VyDrawModel.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * VyShaderParameters VyGlGetActiveParameters(int id) + * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) * } */ - public static MethodHandle VyGlGetActiveParameters$handle() { - return VyGlGetActiveParameters.HANDLE; + public static MethodHandle VyDrawModel$handle() { + return VyDrawModel.HANDLE; } /** * Address for: * {@snippet lang=c : - * VyShaderParameters VyGlGetActiveParameters(int id) + * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) * } */ - public static MemorySegment VyGlGetActiveParameters$address() { - return VyGlGetActiveParameters.ADDR; + public static MemorySegment VyDrawModel$address() { + return VyDrawModel.ADDR; } /** * {@snippet lang=c : - * VyShaderParameters VyGlGetActiveParameters(int id) + * void VyDrawModel(VyModel vyModel, Vector3 position, float scale, Color tint) * } */ - public static MemorySegment VyGlGetActiveParameters(SegmentAllocator allocator, int id) { - var mh$ = VyGlGetActiveParameters.HANDLE; + public static void VyDrawModel(MemorySegment vyModel, MemorySegment position, float scale, MemorySegment tint) { + var mh$ = VyDrawModel.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyGlGetActiveParameters", allocator, id); + traceDowncall("VyDrawModel", vyModel, position, scale, tint); } - return (MemorySegment)mh$.invokeExact(allocator, id); + mh$.invokeExact(vyModel, position, scale, tint); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyGlGetActiveUniformsCount { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_INT, - raylib.C_INT + private static class VyDrawModelEx { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + VyModel.layout(), + Vector3.layout(), + Vector3.layout(), + raylib.C_FLOAT, + Vector3.layout(), + Color.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveUniformsCount"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModelEx"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40724,57 +40732,60 @@ private static class VyGlGetActiveUniformsCount { /** * Function descriptor for: * {@snippet lang=c : - * int VyGlGetActiveUniformsCount(int id) + * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) * } */ - public static FunctionDescriptor VyGlGetActiveUniformsCount$descriptor() { - return VyGlGetActiveUniformsCount.DESC; + public static FunctionDescriptor VyDrawModelEx$descriptor() { + return VyDrawModelEx.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int VyGlGetActiveUniformsCount(int id) + * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) * } */ - public static MethodHandle VyGlGetActiveUniformsCount$handle() { - return VyGlGetActiveUniformsCount.HANDLE; + public static MethodHandle VyDrawModelEx$handle() { + return VyDrawModelEx.HANDLE; } /** * Address for: * {@snippet lang=c : - * int VyGlGetActiveUniformsCount(int id) + * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) * } */ - public static MemorySegment VyGlGetActiveUniformsCount$address() { - return VyGlGetActiveUniformsCount.ADDR; + public static MemorySegment VyDrawModelEx$address() { + return VyDrawModelEx.ADDR; } /** * {@snippet lang=c : - * int VyGlGetActiveUniformsCount(int id) + * void VyDrawModelEx(VyModel vyModel, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) * } */ - public static int VyGlGetActiveUniformsCount(int id) { - var mh$ = VyGlGetActiveUniformsCount.HANDLE; + public static void VyDrawModelEx(MemorySegment vyModel, MemorySegment position, MemorySegment rotationAxis, float rotationAngle, MemorySegment scale, MemorySegment tint) { + var mh$ = VyDrawModelEx.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyGlGetActiveUniformsCount", id); + traceDowncall("VyDrawModelEx", vyModel, position, rotationAxis, rotationAngle, scale, tint); } - return (int)mh$.invokeExact(id); + mh$.invokeExact(vyModel, position, rotationAxis, rotationAngle, scale, tint); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class VyGlGetActiveAttributesCount { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_INT, - raylib.C_INT + private static class VyDrawModelExQuat { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + VyModel.layout(), + Vector3.layout(), + Vector4.layout(), + Vector3.layout(), + Color.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveAttributesCount"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyDrawModelExQuat"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40782,57 +40793,56 @@ private static class VyGlGetActiveAttributesCount { /** * Function descriptor for: * {@snippet lang=c : - * int VyGlGetActiveAttributesCount(int id) + * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) * } */ - public static FunctionDescriptor VyGlGetActiveAttributesCount$descriptor() { - return VyGlGetActiveAttributesCount.DESC; + public static FunctionDescriptor VyDrawModelExQuat$descriptor() { + return VyDrawModelExQuat.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int VyGlGetActiveAttributesCount(int id) + * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) * } */ - public static MethodHandle VyGlGetActiveAttributesCount$handle() { - return VyGlGetActiveAttributesCount.HANDLE; + public static MethodHandle VyDrawModelExQuat$handle() { + return VyDrawModelExQuat.HANDLE; } /** * Address for: * {@snippet lang=c : - * int VyGlGetActiveAttributesCount(int id) + * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) * } */ - public static MemorySegment VyGlGetActiveAttributesCount$address() { - return VyGlGetActiveAttributesCount.ADDR; + public static MemorySegment VyDrawModelExQuat$address() { + return VyDrawModelExQuat.ADDR; } /** * {@snippet lang=c : - * int VyGlGetActiveAttributesCount(int id) + * void VyDrawModelExQuat(VyModel vyModel, Vector3 position, Quaternion quaternion, Vector3 scale, Color tint) * } */ - public static int VyGlGetActiveAttributesCount(int id) { - var mh$ = VyGlGetActiveAttributesCount.HANDLE; + public static void VyDrawModelExQuat(MemorySegment vyModel, MemorySegment position, MemorySegment quaternion, MemorySegment scale, MemorySegment tint) { + var mh$ = VyDrawModelExQuat.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("VyGlGetActiveAttributesCount", id); + traceDowncall("VyDrawModelExQuat", vyModel, position, quaternion, scale, tint); } - return (int)mh$.invokeExact(id); + mh$.invokeExact(vyModel, position, quaternion, scale, tint); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class malloc { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_POINTER, - raylib.C_LONG + private static class VyBeginMode3D { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + VyCamera.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("malloc"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyBeginMode3D"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40840,57 +40850,57 @@ private static class malloc { /** * Function descriptor for: * {@snippet lang=c : - * void *malloc(unsigned long size) + * void VyBeginMode3D(VyCamera camera) * } */ - public static FunctionDescriptor malloc$descriptor() { - return malloc.DESC; + public static FunctionDescriptor VyBeginMode3D$descriptor() { + return VyBeginMode3D.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *malloc(unsigned long size) + * void VyBeginMode3D(VyCamera camera) * } */ - public static MethodHandle malloc$handle() { - return malloc.HANDLE; + public static MethodHandle VyBeginMode3D$handle() { + return VyBeginMode3D.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *malloc(unsigned long size) + * void VyBeginMode3D(VyCamera camera) * } */ - public static MemorySegment malloc$address() { - return malloc.ADDR; + public static MemorySegment VyBeginMode3D$address() { + return VyBeginMode3D.ADDR; } /** * {@snippet lang=c : - * void *malloc(unsigned long size) + * void VyBeginMode3D(VyCamera camera) * } */ - public static MemorySegment malloc(long size) { - var mh$ = malloc.HANDLE; + public static void VyBeginMode3D(MemorySegment camera) { + var mh$ = VyBeginMode3D.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("malloc", size); + traceDowncall("VyBeginMode3D", camera); } - return (MemorySegment)mh$.invokeExact(size); + mh$.invokeExact(camera); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strlen { + private static class VyQuaternionToAxisAngle { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_LONG, - raylib.C_POINTER + raylib.C_FLOAT, + Vector4.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("strlen"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyQuaternionToAxisAngle"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40898,58 +40908,57 @@ private static class strlen { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strlen(const char *str) + * float VyQuaternionToAxisAngle(Quaternion q) * } */ - public static FunctionDescriptor strlen$descriptor() { - return strlen.DESC; + public static FunctionDescriptor VyQuaternionToAxisAngle$descriptor() { + return VyQuaternionToAxisAngle.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strlen(const char *str) + * float VyQuaternionToAxisAngle(Quaternion q) * } */ - public static MethodHandle strlen$handle() { - return strlen.HANDLE; + public static MethodHandle VyQuaternionToAxisAngle$handle() { + return VyQuaternionToAxisAngle.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strlen(const char *str) + * float VyQuaternionToAxisAngle(Quaternion q) * } */ - public static MemorySegment strlen$address() { - return strlen.ADDR; + public static MemorySegment VyQuaternionToAxisAngle$address() { + return VyQuaternionToAxisAngle.ADDR; } /** * {@snippet lang=c : - * unsigned long strlen(const char *str) + * float VyQuaternionToAxisAngle(Quaternion q) * } */ - public static long strlen(MemorySegment str) { - var mh$ = strlen.HANDLE; + public static float VyQuaternionToAxisAngle(MemorySegment q) { + var mh$ = VyQuaternionToAxisAngle.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strlen", str); + traceDowncall("VyQuaternionToAxisAngle", q); } - return (long)mh$.invokeExact(str); + return (float)mh$.invokeExact(q); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcpy { + private static class VyQuaternionToAxisVector { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - raylib.C_POINTER, - raylib.C_POINTER, - raylib.C_POINTER + Vector3.layout(), + Vector4.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("strcpy"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyQuaternionToAxisVector"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -40957,58 +40966,58 @@ private static class strcpy { /** * Function descriptor for: * {@snippet lang=c : - * char *strcpy(char *destination, const char *source) + * Vector3 VyQuaternionToAxisVector(Quaternion q) * } */ - public static FunctionDescriptor strcpy$descriptor() { - return strcpy.DESC; + public static FunctionDescriptor VyQuaternionToAxisVector$descriptor() { + return VyQuaternionToAxisVector.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strcpy(char *destination, const char *source) + * Vector3 VyQuaternionToAxisVector(Quaternion q) * } */ - public static MethodHandle strcpy$handle() { - return strcpy.HANDLE; + public static MethodHandle VyQuaternionToAxisVector$handle() { + return VyQuaternionToAxisVector.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strcpy(char *destination, const char *source) + * Vector3 VyQuaternionToAxisVector(Quaternion q) * } */ - public static MemorySegment strcpy$address() { - return strcpy.ADDR; + public static MemorySegment VyQuaternionToAxisVector$address() { + return VyQuaternionToAxisVector.ADDR; } /** * {@snippet lang=c : - * char *strcpy(char *destination, const char *source) + * Vector3 VyQuaternionToAxisVector(Quaternion q) * } */ - public static MemorySegment strcpy(MemorySegment destination, MemorySegment source) { - var mh$ = strcpy.HANDLE; + public static MemorySegment VyQuaternionToAxisVector(SegmentAllocator allocator, MemorySegment q) { + var mh$ = VyQuaternionToAxisVector.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcpy", destination, source); + traceDowncall("VyQuaternionToAxisVector", allocator, q); } - return (MemorySegment)mh$.invokeExact(destination, source); + return (MemorySegment)mh$.invokeExact(allocator, q); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class glGetProgramiv { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - raylib.C_INT, - raylib.C_INT, - raylib.C_POINTER + private static class VyGetScreenToWorldRay { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + Ray.layout(), + Vector2.layout(), + VyCamera.layout() ); - public static final MemorySegment ADDR = raylib.findOrThrow("glGetProgramiv"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyGetScreenToWorldRay"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -41016,62 +41025,60 @@ private static class glGetProgramiv { /** * Function descriptor for: * {@snippet lang=c : - * void glGetProgramiv(int program, int pname, int *params) + * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) * } */ - public static FunctionDescriptor glGetProgramiv$descriptor() { - return glGetProgramiv.DESC; + public static FunctionDescriptor VyGetScreenToWorldRay$descriptor() { + return VyGetScreenToWorldRay.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void glGetProgramiv(int program, int pname, int *params) + * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) * } */ - public static MethodHandle glGetProgramiv$handle() { - return glGetProgramiv.HANDLE; + public static MethodHandle VyGetScreenToWorldRay$handle() { + return VyGetScreenToWorldRay.HANDLE; } /** * Address for: * {@snippet lang=c : - * void glGetProgramiv(int program, int pname, int *params) + * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) * } */ - public static MemorySegment glGetProgramiv$address() { - return glGetProgramiv.ADDR; + public static MemorySegment VyGetScreenToWorldRay$address() { + return VyGetScreenToWorldRay.ADDR; } /** * {@snippet lang=c : - * void glGetProgramiv(int program, int pname, int *params) + * Ray VyGetScreenToWorldRay(Vector2 position, VyCamera camera) * } */ - public static void glGetProgramiv(int program, int pname, MemorySegment params) { - var mh$ = glGetProgramiv.HANDLE; + public static MemorySegment VyGetScreenToWorldRay(SegmentAllocator allocator, MemorySegment position, MemorySegment camera) { + var mh$ = VyGetScreenToWorldRay.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("glGetProgramiv", program, pname, params); + traceDowncall("VyGetScreenToWorldRay", allocator, position, camera); } - mh$.invokeExact(program, pname, params); + return (MemorySegment)mh$.invokeExact(allocator, position, camera); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class glGetActiveUniform { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - raylib.C_INT, - raylib.C_INT, + private static class VyGetScreenToWorldRayEx { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + Ray.layout(), + Vector2.layout(), + VyCamera.layout(), raylib.C_INT, - raylib.C_POINTER, - raylib.C_POINTER, - raylib.C_POINTER, - raylib.C_POINTER + raylib.C_INT ); - public static final MemorySegment ADDR = raylib.findOrThrow("glGetActiveUniform"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyGetScreenToWorldRayEx"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -41079,62 +41086,57 @@ private static class glGetActiveUniform { /** * Function descriptor for: * {@snippet lang=c : - * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) * } */ - public static FunctionDescriptor glGetActiveUniform$descriptor() { - return glGetActiveUniform.DESC; + public static FunctionDescriptor VyGetScreenToWorldRayEx$descriptor() { + return VyGetScreenToWorldRayEx.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) * } */ - public static MethodHandle glGetActiveUniform$handle() { - return glGetActiveUniform.HANDLE; + public static MethodHandle VyGetScreenToWorldRayEx$handle() { + return VyGetScreenToWorldRayEx.HANDLE; } /** * Address for: * {@snippet lang=c : - * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) * } */ - public static MemorySegment glGetActiveUniform$address() { - return glGetActiveUniform.ADDR; + public static MemorySegment VyGetScreenToWorldRayEx$address() { + return VyGetScreenToWorldRayEx.ADDR; } /** * {@snippet lang=c : - * void glGetActiveUniform(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * Ray VyGetScreenToWorldRayEx(Vector2 position, VyCamera camera, int width, int height) * } */ - public static void glGetActiveUniform(int program, int index, int bufSize, MemorySegment length, MemorySegment size, MemorySegment type, MemorySegment name) { - var mh$ = glGetActiveUniform.HANDLE; + public static MemorySegment VyGetScreenToWorldRayEx(SegmentAllocator allocator, MemorySegment position, MemorySegment camera, int width, int height) { + var mh$ = VyGetScreenToWorldRayEx.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("glGetActiveUniform", program, index, bufSize, length, size, type, name); + traceDowncall("VyGetScreenToWorldRayEx", allocator, position, camera, width, height); } - mh$.invokeExact(program, index, bufSize, length, size, type, name); + return (MemorySegment)mh$.invokeExact(allocator, position, camera, width, height); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class glGetActiveAttrib { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - raylib.C_INT, - raylib.C_INT, - raylib.C_INT, - raylib.C_POINTER, - raylib.C_POINTER, - raylib.C_POINTER, - raylib.C_POINTER + private static class VyGlGetActiveParameters { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + VyShaderParameters.layout(), + raylib.C_INT ); - public static final MemorySegment ADDR = raylib.findOrThrow("glGetActiveAttrib"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveParameters"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -41142,58 +41144,57 @@ private static class glGetActiveAttrib { /** * Function descriptor for: * {@snippet lang=c : - * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * VyShaderParameters VyGlGetActiveParameters(int id) * } */ - public static FunctionDescriptor glGetActiveAttrib$descriptor() { - return glGetActiveAttrib.DESC; + public static FunctionDescriptor VyGlGetActiveParameters$descriptor() { + return VyGlGetActiveParameters.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * VyShaderParameters VyGlGetActiveParameters(int id) * } */ - public static MethodHandle glGetActiveAttrib$handle() { - return glGetActiveAttrib.HANDLE; + public static MethodHandle VyGlGetActiveParameters$handle() { + return VyGlGetActiveParameters.HANDLE; } /** * Address for: * {@snippet lang=c : - * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * VyShaderParameters VyGlGetActiveParameters(int id) * } */ - public static MemorySegment glGetActiveAttrib$address() { - return glGetActiveAttrib.ADDR; + public static MemorySegment VyGlGetActiveParameters$address() { + return VyGlGetActiveParameters.ADDR; } /** * {@snippet lang=c : - * void glGetActiveAttrib(int program, int index, int bufSize, int *length, int *size, int *type, char *name) + * VyShaderParameters VyGlGetActiveParameters(int id) * } */ - public static void glGetActiveAttrib(int program, int index, int bufSize, MemorySegment length, MemorySegment size, MemorySegment type, MemorySegment name) { - var mh$ = glGetActiveAttrib.HANDLE; + public static MemorySegment VyGlGetActiveParameters(SegmentAllocator allocator, int id) { + var mh$ = VyGlGetActiveParameters.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("glGetActiveAttrib", program, index, bufSize, length, size, type, name); + traceDowncall("VyGlGetActiveParameters", allocator, id); } - mh$.invokeExact(program, index, bufSize, length, size, type, name); + return (MemorySegment)mh$.invokeExact(allocator, id); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class glGetUniformLocation { + private static class VyGlGetActiveUniformsCount { public static final FunctionDescriptor DESC = FunctionDescriptor.of( raylib.C_INT, - raylib.C_INT, - raylib.C_POINTER + raylib.C_INT ); - public static final MemorySegment ADDR = raylib.findOrThrow("glGetUniformLocation"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveUniformsCount"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -41201,58 +41202,57 @@ private static class glGetUniformLocation { /** * Function descriptor for: * {@snippet lang=c : - * int glGetUniformLocation(int program, const char *name) + * int VyGlGetActiveUniformsCount(int id) * } */ - public static FunctionDescriptor glGetUniformLocation$descriptor() { - return glGetUniformLocation.DESC; + public static FunctionDescriptor VyGlGetActiveUniformsCount$descriptor() { + return VyGlGetActiveUniformsCount.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int glGetUniformLocation(int program, const char *name) + * int VyGlGetActiveUniformsCount(int id) * } */ - public static MethodHandle glGetUniformLocation$handle() { - return glGetUniformLocation.HANDLE; + public static MethodHandle VyGlGetActiveUniformsCount$handle() { + return VyGlGetActiveUniformsCount.HANDLE; } /** * Address for: * {@snippet lang=c : - * int glGetUniformLocation(int program, const char *name) + * int VyGlGetActiveUniformsCount(int id) * } */ - public static MemorySegment glGetUniformLocation$address() { - return glGetUniformLocation.ADDR; + public static MemorySegment VyGlGetActiveUniformsCount$address() { + return VyGlGetActiveUniformsCount.ADDR; } /** * {@snippet lang=c : - * int glGetUniformLocation(int program, const char *name) + * int VyGlGetActiveUniformsCount(int id) * } */ - public static int glGetUniformLocation(int program, MemorySegment name) { - var mh$ = glGetUniformLocation.HANDLE; + public static int VyGlGetActiveUniformsCount(int id) { + var mh$ = VyGlGetActiveUniformsCount.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("glGetUniformLocation", program, name); + traceDowncall("VyGlGetActiveUniformsCount", id); } - return (int)mh$.invokeExact(program, name); + return (int)mh$.invokeExact(id); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class glGetAttribLocation { + private static class VyGlGetActiveAttributesCount { public static final FunctionDescriptor DESC = FunctionDescriptor.of( raylib.C_INT, - raylib.C_INT, - raylib.C_POINTER + raylib.C_INT ); - public static final MemorySegment ADDR = raylib.findOrThrow("glGetAttribLocation"); + public static final MemorySegment ADDR = raylib.findOrThrow("VyGlGetActiveAttributesCount"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -41260,45 +41260,45 @@ private static class glGetAttribLocation { /** * Function descriptor for: * {@snippet lang=c : - * int glGetAttribLocation(int program, const char *name) + * int VyGlGetActiveAttributesCount(int id) * } */ - public static FunctionDescriptor glGetAttribLocation$descriptor() { - return glGetAttribLocation.DESC; + public static FunctionDescriptor VyGlGetActiveAttributesCount$descriptor() { + return VyGlGetActiveAttributesCount.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int glGetAttribLocation(int program, const char *name) + * int VyGlGetActiveAttributesCount(int id) * } */ - public static MethodHandle glGetAttribLocation$handle() { - return glGetAttribLocation.HANDLE; + public static MethodHandle VyGlGetActiveAttributesCount$handle() { + return VyGlGetActiveAttributesCount.HANDLE; } /** * Address for: * {@snippet lang=c : - * int glGetAttribLocation(int program, const char *name) + * int VyGlGetActiveAttributesCount(int id) * } */ - public static MemorySegment glGetAttribLocation$address() { - return glGetAttribLocation.ADDR; + public static MemorySegment VyGlGetActiveAttributesCount$address() { + return VyGlGetActiveAttributesCount.ADDR; } /** * {@snippet lang=c : - * int glGetAttribLocation(int program, const char *name) + * int VyGlGetActiveAttributesCount(int id) * } */ - public static int glGetAttribLocation(int program, MemorySegment name) { - var mh$ = glGetAttribLocation.HANDLE; + public static int VyGlGetActiveAttributesCount(int id) { + var mh$ = VyGlGetActiveAttributesCount.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("glGetAttribLocation", program, name); + traceDowncall("VyGlGetActiveAttributesCount", id); } - return (int)mh$.invokeExact(program, name); + return (int)mh$.invokeExact(id); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); }