Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: [ "main" ]

env:
raylib_version: 'a8240722c61d216d96c3f2cab27426ee7b7a3919'
raylib_version: '5.5'

jobs:

Expand All @@ -34,7 +34,7 @@ jobs:
- name: Build Raylib
shell: bash
run: |
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/${{ env.raylib_version }}.zip
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${{ env.raylib_version }}.zip
unzip -qq raylib.zip
cmake -S raylib-${{ env.raylib_version }} \
-A ${{ matrix.name }} \
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
# Build Raylib
- name: Build Raylib
run: |
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/${{ env.raylib_version }}.zip
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${{ env.raylib_version }}.zip
unzip -qq raylib.zip
cmake -S raylib-${{ env.raylib_version }} \
-B native \
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
# Build Raylib
- name: Build Raylib
run: |
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/${{ env.raylib_version }}.zip
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${{ env.raylib_version }}.zip
unzip -qq raylib.zip
cmake -S raylib-${{ env.raylib_version }} \
-B native \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Unlock advanced rendering capabilities with [Bliss](https://github.com/MrScautHD

# 🪙 Installation - [Nuget](https://www.nuget.org/packages/Raylib-CSharp)
```
dotnet add package Raylib-CSharp --version 4.1.9
dotnet add package Raylib-CSharp --version 5.0.0
```

# 📖 [Installation - From source]
Expand Down Expand Up @@ -73,7 +73,7 @@ dotnet add package Raylib-CSharp --version 4.1.9
| .NET 5.0, 6.0 / C# 10 | .NET 8.0 / C# 12 |
| Released 2018-07 | Released 2024-05 |
| License ZLib | License MIT |
| Raylib 5.0 | Raylib 5.1-dev |
| Raylib 5.0 | Raylib 5.5 |

# ✍️ Acknowledgement
This library is available under the [MIT](https://choosealicense.com/licenses/mit) license.
7 changes: 3 additions & 4 deletions src/Raylib-CSharp.Samples/CMake.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<RlVersion>a8240722c61d216d96c3f2cab27426ee7b7a3919</RlVersion>
<RlVersion>5.5</RlVersion>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
Expand All @@ -15,11 +15,10 @@
<RlName>libraylib.dylib</RlName>
</PropertyGroup>

<!-- Todo: When "dev-5.1" release move back to "Tags" instead of "commits": "https://github.com/raysan5/raylib/archive/refs/tags/$(RlVersion).zip" -->
<!-- Download Raylib -->
<Target Name="DownloadRaylib" BeforeTargets="UnZipRaylib">
<DownloadFile DestinationFolder="$(IntermediateOutputPath)"
SourceUrl="https://github.com/raysan5/raylib/archive/$(RlVersion).zip"
SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(RlVersion).zip"
DestinationFileName="raylib-$(RlVersion).zip"
Condition="!Exists('$(IntermediateOutputPath)raylib-$(RlVersion).zip')" />
</Target>
Expand Down Expand Up @@ -58,4 +57,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
</Project>
7 changes: 3 additions & 4 deletions src/Raylib-CSharp.Test/CMake.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<RlVersion>a8240722c61d216d96c3f2cab27426ee7b7a3919</RlVersion>
<RlVersion>5.5</RlVersion>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
Expand All @@ -15,11 +15,10 @@
<RlName>libraylib.dylib</RlName>
</PropertyGroup>

<!-- Todo: When "dev-5.1" release move back to "Tags" instead of "commits": "https://github.com/raysan5/raylib/archive/refs/tags/$(RlVersion).zip" -->
<!-- Download Raylib -->
<Target Name="DownloadRaylib" BeforeTargets="UnZipRaylib">
<DownloadFile DestinationFolder="$(IntermediateOutputPath)"
SourceUrl="https://github.com/raysan5/raylib/archive/$(RlVersion).zip"
SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(RlVersion).zip"
DestinationFileName="raylib-$(RlVersion).zip"
Condition="!Exists('$(IntermediateOutputPath)raylib-$(RlVersion).zip')" />
</Target>
Expand Down Expand Up @@ -58,4 +57,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
</Project>
20 changes: 19 additions & 1 deletion src/Raylib-CSharp.Test/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using System.Text;
using OpenTK.Graphics;
using Raylib_CSharp.Camera.Cam3D;
using Raylib_CSharp.Colors;
Expand Down Expand Up @@ -77,8 +78,12 @@
Console.WriteLine(info.Length + "");

Image image = Font.GenImageAtlas(info, font.Recs, 18, 4, 0);
Image clipboardImage = Window.GetClipboardImage(); //Not suported on all platforms
Texture2D texture = Texture2D.LoadFromImage(image);
Texture2D clipboardTexture = Texture2D.LoadFromImage(clipboardImage);
image.Unload();
clipboardImage.Unload();


FileManager.UnloadFileData(fileData);
TextManager.UnloadCodepoints(codepoints);
Expand All @@ -104,14 +109,26 @@

Font font2 = Font.GetDefault();

//if (font2.IsReady()) {
//if (font2.IsValid()) {
//
//}

Image testImage = Image.GenColor(100, 100, Color.Green);

NativeBindingsContext context = new NativeBindingsContext();
GLLoader.LoadBindings(context);
Console.WriteLine($"Bones:{model.Meshes[0].BoneCount}");
Console.WriteLine($"BoneMatrices:{model.Meshes[0].BoneMatrices[0]}");
var dataToEncode = Encoding.ASCII.GetBytes("This is a test");
Console.WriteLine($"CRC32 Checksum:{FileManager.ComputeCRC32(dataToEncode)}"); //As ISO-HDLC

uint[] md5Hash = FileManager.ComputeMD5(dataToEncode);
string hexString = string.Join("", md5Hash.Select(x => x.ToString("x8")));
Console.WriteLine($"MD5 Checksum: {hexString}");

uint[] sha1Hash = FileManager.ComputeSHA1(dataToEncode);
hexString = string.Join("", sha1Hash.Select(x => x.ToString("x8")));
Console.WriteLine($"SHA1 Checksum: {hexString}");

//Span<Matrix4x4> matrix = new(new Matrix4x4[1]);
//matrix[1] = new Matrix4x4();
Expand All @@ -133,6 +150,7 @@

Graphics.DrawFPS(50, 50);
Graphics.DrawTexture(texture, 10, 10, Color.White);
Graphics.DrawTexture(clipboardTexture, 128, 128, Color.White);

Graphics.EndDrawing();
}
Expand Down
Loading
Loading