From 3e21233ca0c3fd26d0b7c529e9eabf4bd1d6e86d Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Fri, 9 Sep 2022 18:06:32 +0100 Subject: [PATCH] Review rlgl bindings --- Raylib-cs/interop/Rlgl.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Raylib-cs/interop/Rlgl.cs b/Raylib-cs/interop/Rlgl.cs index 8e49be1..4f586d9 100644 --- a/Raylib-cs/interop/Rlgl.cs +++ b/Raylib-cs/interop/Rlgl.cs @@ -466,6 +466,10 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void rlUpdateVertexBuffer(uint bufferId, void* data, int dataSize, int offset); + /// Update vertex buffer elements with new data + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void rlUpdateVertexBufferElements(uint id, void* data, int dataSize, int offset); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void rlUnloadVertexArray(uint vaoId); @@ -596,9 +600,9 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void rlSetUniformSampler(int locIndex, uint textureId); - /// Set shader currently active + /// Set shader currently active (id and locations) [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void rlSetShader(Shader shader); + public static extern void rlSetShader(uint id, int* locs); // Compute shader management @@ -621,7 +625,7 @@ namespace Raylib_cs /// Update SSBO buffer data [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void rlUpdateShaderBufferElements(Shader shader); + public static extern void rlUpdateShaderBufferElements(uint id, void* data, ulong dataSize, ulong offset); /// Get SSBO buffer size [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]