2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-06-30 19:03:42 -04:00

Update to raylib 4.2 (#117)

Update bindings to use raylib 4.2.0. Review comments and utils.
This commit is contained in:
2022-10-01 12:27:25 +01:00
committed by GitHub
parent 65d9150ec4
commit 0d994b0992
10 changed files with 325 additions and 126 deletions

View File

@ -64,6 +64,7 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlMatrixMode(int mode);
/// <inheritdoc cref="rlMatrixMode(int)"/>
public static void rlMatrixMode(MatrixMode mode)
{
rlMatrixMode((int)mode);
@ -94,8 +95,7 @@ namespace Raylib_cs
public static extern void rlScalef(float x, float y, float z);
/// <summary>
/// Multiply the current matrix by another matrix
/// <br/>
/// Multiply the current matrix by another matrix<br/>
/// Current Matrix can be set via <see cref="rlMatrixMode(int)"/>
/// </summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -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);
/// <summary>Update vertex buffer elements with new data</summary>
[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);
@ -511,7 +515,7 @@ namespace Raylib_cs
/// <summary>Update GPU texture with new data</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlUpdateTexture(uint id, int width, int height, PixelFormat format, void* data);
public static extern void rlUpdateTexture(uint id, int offsetX, int offsetY, int width, int height, PixelFormat format, void* data);
/// <summary>Get OpenGL internal formats</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -596,9 +600,9 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlSetUniformSampler(int locIndex, uint textureId);
/// <summary>Set shader currently active</summary>
/// <summary>Set shader currently active (id and locations)</summary>
[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
/// <summary>Update SSBO buffer data</summary>
[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);
/// <summary>Get SSBO buffer size</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]