Skip to content

Commit 9b81c1f

Browse files
committed
Update to latest Raylib 5.1-dev version.
1 parent 8c1630e commit 9b81c1f

11 files changed

Lines changed: 132 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ "main" ]
1010

1111
env:
12-
raylib_version: '11202bf299a70a8ef30e28ab99a8184bbb119a99'
12+
raylib_version: '4311db5ba5eb23c8f1d71268010afb135f3e1e25'
1313

1414
jobs:
1515

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ __Raylib-CSharp__ is a fully managed binding over `Raylib-5.1-dev`.
1414

1515
# 🪙 Installation - [Nuget](https://www.nuget.org/packages/Raylib-CSharp)
1616
```
17-
dotnet add package Raylib-CSharp --version 4.1.3
17+
dotnet add package Raylib-CSharp --version 4.1.4
1818
```
1919

2020
# 📖 [Installation - From source]

src/Raylib-CSharp.Samples/CMake.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<RlVersion>11202bf299a70a8ef30e28ab99a8184bbb119a99</RlVersion>
3+
<RlVersion>4311db5ba5eb23c8f1d71268010afb135f3e1e25</RlVersion>
44
</PropertyGroup>
55

66
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">

src/Raylib-CSharp.Test/CMake.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<RlVersion>11202bf299a70a8ef30e28ab99a8184bbb119a99</RlVersion>
3+
<RlVersion>4311db5ba5eb23c8f1d71268010afb135f3e1e25</RlVersion>
44
</PropertyGroup>
55

66
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">

src/Raylib-CSharp/Apis/RayMathApi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,12 +1124,12 @@ internal static partial class RayMathApi {
11241124
/// <param name="right">Right boundary of the frustum view volume.</param>
11251125
/// <param name="bottom">Bottom boundary of the frustum view volume.</param>
11261126
/// <param name="top">Top boundary of the frustum view volume.</param>
1127-
/// <param name="near">Near boundary of the frustum view volume.</param>
1128-
/// <param name="far">Far boundary of the frustum view volume.</param>
1127+
/// <param name="nearPlane">Near boundary of the frustum view volume.</param>
1128+
/// <param name="farPlane">Far boundary of the frustum view volume.</param>
11291129
/// <returns>A Matrix4x4 representing the frustum perspective projection matrix.</returns>
11301130
[LibraryImport(Raylib.Name)]
11311131
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
1132-
internal static partial Matrix4x4 MatrixFrustum(double left, double right, double bottom, double top, double near, double far);
1132+
internal static partial Matrix4x4 MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane);
11331133

11341134
/// <summary>
11351135
/// Get perspective projection matrix.

src/Raylib-CSharp/Apis/RaylibApi.cs

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4515,6 +4515,67 @@ internal static partial class RaylibApi {
45154515
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
45164516
internal static partial void ImageDrawRectangleLines(ref Image dst, Rectangle rec, int thick, Color color);
45174517

4518+
/// <summary>
4519+
/// Draw triangle within an image.
4520+
/// </summary>
4521+
/// <param name="dst">The destination image on which to draw the triangle.</param>
4522+
/// <param name="v1">The first vertex of the triangle.</param>
4523+
/// <param name="v2">The second vertex of the triangle.</param>
4524+
/// <param name="v3">The third vertex of the triangle.</param>
4525+
/// <param name="color">The color of the filled triangle.</param>
4526+
[LibraryImport(Raylib.Name)]
4527+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4528+
internal static partial void ImageDrawTriangle(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
4529+
4530+
/// <summary>
4531+
/// Draw triangle with interpolated colors within an image.
4532+
/// </summary>
4533+
/// <param name="dst">The image on which to draw the triangle.</param>
4534+
/// <param name="v1">The first vertex of the triangle.</param>
4535+
/// <param name="v2">The second vertex of the triangle.</param>
4536+
/// <param name="v3">The third vertex of the triangle.</param>
4537+
/// <param name="c1">The color of the first vertex.</param>
4538+
/// <param name="c2">The color of the second vertex.</param>
4539+
/// <param name="c3">The color of the third vertex.</param>
4540+
[LibraryImport(Raylib.Name)]
4541+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4542+
internal static partial void ImageDrawTriangleEx(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3);
4543+
4544+
/// <summary>
4545+
/// Draw triangle outline within an image.
4546+
/// </summary>
4547+
/// <param name="dst">The image on which to draw the triangle.</param>
4548+
/// <param name="v1">The first vertex of the triangle.</param>
4549+
/// <param name="v2">The second vertex of the triangle.</param>
4550+
/// <param name="v3">The third vertex of the triangle.</param>
4551+
/// <param name="color">The color of the triangle outline.</param>
4552+
[LibraryImport(Raylib.Name)]
4553+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4554+
internal static partial void ImageDrawTriangleLines(ref Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
4555+
4556+
4557+
/// <summary>
4558+
/// Draw a triangle fan defined by points within an image (first vertex is the center).
4559+
/// </summary>
4560+
/// <param name="dst">The destination image.</param>
4561+
/// <param name="points">A pointer to an array of Vector2 points defining the vertices of the triangle fan.</param>
4562+
/// <param name="pointCount">The number of points in the array.</param>
4563+
/// <param name="color">The color of the filled triangle fan.</param>
4564+
[LibraryImport(Raylib.Name)]
4565+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4566+
internal static unsafe partial void ImageDrawTriangleFan(ref Image dst, Vector2* points, int pointCount, Color color);
4567+
4568+
/// <summary>
4569+
/// Draw a triangle strip defined by points within an image.
4570+
/// </summary>
4571+
/// <param name="dst">The destination image.</param>
4572+
/// <param name="points">A pointer to an array of Vector2 points.</param>
4573+
/// <param name="pointCount">The number of points in the array.</param>
4574+
/// <param name="color">The color of the triangle strip.</param>
4575+
[LibraryImport(Raylib.Name)]
4576+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4577+
internal static unsafe partial void ImageDrawTriangleStrip(ref Image dst, Vector2* points, int pointCount, Color color);
4578+
45184579
/// <summary>
45194580
/// Draw a source image within a destination image (tint applied to source).
45204581
/// </summary>
@@ -5257,6 +5318,26 @@ internal static partial class RaylibApi {
52575318
[return: MarshalUsing(typeof(NonFreeUtf8StringMarshaller))]
52585319
internal static partial string TextToPascal(string text);
52595320

5321+
/// <summary>
5322+
/// Get Snake case notation version of provided string.
5323+
/// </summary>
5324+
/// <param name="text">The text to be converted.</param>
5325+
/// <returns>The converted text in snake case.</returns>
5326+
[LibraryImport(Raylib.Name, StringMarshalling = StringMarshalling.Utf8)]
5327+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
5328+
[return: MarshalUsing(typeof(NonFreeUtf8StringMarshaller))]
5329+
internal static partial string TextToSnake(string text);
5330+
5331+
/// <summary>
5332+
/// Get Camel case notation version of provided string.
5333+
/// </summary>
5334+
/// <param name="text">The text string to convert.</param>
5335+
/// <returns>The text string converted to camel case.</returns>
5336+
[LibraryImport(Raylib.Name, StringMarshalling = StringMarshalling.Utf8)]
5337+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
5338+
[return: MarshalUsing(typeof(NonFreeUtf8StringMarshaller))]
5339+
internal static partial string TextToCamel(string text);
5340+
52605341
/// <summary>
52615342
/// Get integer value from text (negative values not supported).
52625343
/// </summary>

src/Raylib-CSharp/Apis/RlGlApi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ internal static partial class RlGlApi {
121121
/// <summary>
122122
/// Set clip planes distances.
123123
/// </summary>
124-
/// <param name="near">The distance to the near clipping plane.</param>
125-
/// <param name="far">The distance to the far clipping plane.</param>
124+
/// <param name="nearPlane">The distance to the near clipping plane.</param>
125+
/// <param name="farPlane">The distance to the far clipping plane.</param>
126126
[LibraryImport(Raylib.Name, EntryPoint = "rlSetClipPlanes")]
127127
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
128-
internal static partial void SetClipPlanes(double near, double far);
128+
internal static partial void SetClipPlanes(double nearPlane, double farPlane);
129129

130130
/// <summary>
131131
/// Get cull plane distance near.

src/Raylib-CSharp/Fonts/TextManager.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ public static string TextToPascal(string text) {
139139
return RaylibApi.TextToPascal(text);
140140
}
141141

142+
/// <inheritdoc cref="RaylibApi.TextToSnake" />
143+
public static string TextToSnake(string text) {
144+
return RaylibApi.TextToSnake(text);
145+
}
146+
147+
/// <inheritdoc cref="RaylibApi.TextToCamel" />
148+
public static string TextToCamel(string text) {
149+
return RaylibApi.TextToCamel(text);
150+
}
151+
142152
/// <inheritdoc cref="RaylibApi.TextToInteger" />
143153
public static int TextToInteger(string text) {
144154
return RaylibApi.TextToInteger(text);

src/Raylib-CSharp/Images/Image.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,35 @@ public void DrawRectangleLines(Rectangle rec, int thick, Color color) {
396396
RaylibApi.ImageDrawRectangleLines(ref this, rec, thick, color);
397397
}
398398

399+
/// <inheritdoc cref="RaylibApi.ImageDrawTriangle" />
400+
public void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color) {
401+
RaylibApi.ImageDrawTriangle(ref this, v1, v2, v3, color);
402+
}
403+
404+
/// <inheritdoc cref="RaylibApi.ImageDrawTriangleEx" />
405+
public void DrawTriangleEx(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3) {
406+
RaylibApi.ImageDrawTriangleEx(ref this, v1, v2, v3, c1, c2, c3);
407+
}
408+
409+
/// <inheritdoc cref="RaylibApi.ImageDrawTriangleLines" />
410+
public void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color) {
411+
RaylibApi.ImageDrawTriangleLines(ref this, v1, v2, v3, color);
412+
}
413+
414+
/// <inheritdoc cref="RaylibApi.ImageDrawTriangleFan" />
415+
public unsafe void DrawTriangleFan(Span<Vector2> points, Color color) {
416+
fixed (Vector2* pointsPtr = points) {
417+
RaylibApi.ImageDrawTriangleFan(ref this, pointsPtr, points.Length, color);
418+
}
419+
}
420+
421+
/// <inheritdoc cref="RaylibApi.ImageDrawTriangleStrip" />
422+
public unsafe void DrawTriangleStrip(Span<Vector2> points, Color color) {
423+
fixed (Vector2* pointsPtr = points) {
424+
RaylibApi.ImageDrawTriangleStrip(ref this, pointsPtr, points.Length, color);
425+
}
426+
}
427+
399428
/// <inheritdoc cref="RaylibApi.ImageDraw" />
400429
public void Draw(Image src, Rectangle srcRec, Rectangle dstRec, Color tint) {
401430
RaylibApi.ImageDraw(ref this, src, srcRec, dstRec, tint);

src/Raylib-CSharp/Raylib-CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PropertyGroup>
1414
<Title>Raylib-CSharp</Title>
1515
<Authors>MrScautHD</Authors>
16-
<Version>4.1.2</Version>
16+
<Version>4.1.4</Version>
1717
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1818
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1919
<NoWarn>$(NoWarn);1591</NoWarn>

0 commit comments

Comments
 (0)