Watch
2
0
Fork
You've already forked raylib-cs
0

Updated and clarified XML comments for methods and parameters, improved naming consistency, and refined shader-related functions. Renamed enums in Shader.cs for so it is inline with the upstream.

This commit is contained in:
Meatcorps 2026-05-23 10:56:45 +02:00
commit 4263ddf570
3 changed files with 13 additions and 13 deletions

View file

@ -1096,7 +1096,7 @@ public static unsafe partial class Raylib
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int GetCharPressed(); public static partial int GetCharPressed();
/// <summary>Get gamepad internal name id</summary> /// <summary>Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)</summary>
[LibraryImport(NativeLibName)] [LibraryImport(NativeLibName)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial sbyte* GetKeyName(KeyboardKey key); public static partial sbyte* GetKeyName(KeyboardKey key);
@ -3328,7 +3328,7 @@ public static unsafe partial class Raylib
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); public static partial void UpdateModelAnimation(Model model, ModelAnimation anim, float frame);
/// <summary>// Update model animation pose, blending two animations</summary> /// <summary>Update model animation pose, blending two animations</summary>
[LibraryImport(NativeLibName)] [LibraryImport(NativeLibName)]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void UpdateModelAnimationEx(Model model, ModelAnimation anim, float frame, ModelAnimation animB, float frameB, float blend); public static partial void UpdateModelAnimationEx(Model model, ModelAnimation anim, float frame, ModelAnimation animB, float frameB, float blend);

View file

@ -482,7 +482,7 @@ public static unsafe partial class Rlgl
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial float GetPointSize(); public static partial float GetPointSize();
/// <summary>Disable wire mode</summary> /// <summary>Enable wire mode</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlEnableWireMode")] [LibraryImport(NativeLibName, EntryPoint = "rlEnableWireMode")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void EnableWireMode(); public static partial void EnableWireMode();
@ -844,12 +844,12 @@ public static unsafe partial class Rlgl
/// <summary>Copy framebuffer pixel data to internal buffer</summary> /// <summary>Copy framebuffer pixel data to internal buffer</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlCopyFramebuffer")] [LibraryImport(NativeLibName, EntryPoint = "rlCopyFramebuffer")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void rlCopyFramebuffer(int x, int y, int width, int height, int format, void* pixels); public static partial void CopyFramebuffer(int x, int y, int width, int height, int format, void* pixels);
/// <summary>Copy framebuffer pixel data to internal buffer</summary> /// <summary>Resize internal framebuffer</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlResizeFramebuffer")] [LibraryImport(NativeLibName, EntryPoint = "rlResizeFramebuffer")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void rlResizeFramebuffer(int width, int height); public static partial void ResizeFramebuffer(int width, int height);
// Shaders management // Shaders management
@ -863,18 +863,18 @@ public static unsafe partial class Rlgl
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial uint LoadShaderProgram(sbyte* vsCode, sbyte* fsCode); public static partial uint LoadShaderProgram(sbyte* vsCode, sbyte* fsCode);
/// <summary>Load shader from code strings</summary> /// <summary>Load shader program, using already loaded shader ids</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlLoadShaderProgramEx")] [LibraryImport(NativeLibName, EntryPoint = "rlLoadShaderProgramEx")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial uint LoadShaderProgramEx(uint vsId, uint fsId); public static partial uint LoadShaderProgramEx(uint vsId, uint fsId);
/// <summary>Load shader from code strings</summary> /// <summary>Load compute shader program</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlLoadShaderProgramCompute")] [LibraryImport(NativeLibName, EntryPoint = "rlLoadShaderProgramCompute")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial uint LoadShaderProgramCompute(uint csId); public static partial uint LoadShaderProgramCompute(uint csId);
/// <summary>Unload shader program</summary> /// <summary>Unload shader, loaded with LoadShader()</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlUnloadShader")] [LibraryImport(NativeLibName, EntryPoint = "rlUnloadShader")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void UnloadShader(uint id); public static partial void UnloadShader(uint id);
@ -884,12 +884,12 @@ public static unsafe partial class Rlgl
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial void UnloadShaderProgram(uint id); public static partial void UnloadShaderProgram(uint id);
/// <summary>Get shader location uniform</summary> /// <summary>Get shader location uniform, requires shader program id</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlGetLocationUniform")] [LibraryImport(NativeLibName, EntryPoint = "rlGetLocationUniform")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int GetLocationUniform(uint shaderId, sbyte* uniformName); public static partial int GetLocationUniform(uint shaderId, sbyte* uniformName);
/// <summary>Get shader location attribute</summary> /// <summary>Get shader location attribute, requires shader program id</summary>
[LibraryImport(NativeLibName, EntryPoint = "rlGetLocationAttrib")] [LibraryImport(NativeLibName, EntryPoint = "rlGetLocationAttrib")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int GetLocationAttrib(uint shaderId, sbyte* attribName); public static partial int GetLocationAttrib(uint shaderId, sbyte* attribName);

View file

@ -35,8 +35,8 @@ public enum ShaderLocationIndex
MapBrdf, MapBrdf,
VertexBoneIds, VertexBoneIds,
VertexBoneWeights, VertexBoneWeights,
BoneTransforms, MatrixBoneTransforms,
BoneInstanceTransform, VertexInstanceTransform,
MapDiffuse = MapAlbedo, MapDiffuse = MapAlbedo,
MapSpecular = MapMetalness, MapSpecular = MapMetalness,