Raylib-CsLo
4.0.0-alpha.0
See the version list below for details.
dotnet add package Raylib-CsLo --version 4.0.0-alpha.0
NuGet\Install-Package Raylib-CsLo -Version 4.0.0-alpha.0
<PackageReference Include="Raylib-CsLo" Version="4.0.0-alpha.0" />
paket add Raylib-CsLo --version 4.0.0-alpha.0
#r "nuget: Raylib-CsLo, 4.0.0-alpha.0"
// Install Raylib-CsLo as a Cake Addin #addin nuget:?package=Raylib-CsLo&version=4.0.0-alpha.0&prerelease // Install Raylib-CsLo as a Cake Tool #tool nuget:?package=Raylib-CsLo&version=4.0.0-alpha.0&prerelease
<h1 align="center"> <a href="#"><img align="center" src="meta/logos/raylib-cslo_128x128.png" height="96"> Raylib-CsLo</a> <br /> </h1>
<div align="center">
</div>
Raylib-CsLo
LowLevel autogen bindings to Raylib 4.0 and convenience wrappers on top.
- Requires use of
unsafe
- A focus on performance. No runtime allocations if at all possible.
- because these are autogen, there won't be any intellisense docs. read the raylib cheatsheet for docs
Table of Contents
- Raylib-CsLo
- Table of Contents
- 🚧🚨🚧 UNDER CONSTRUCTION 🚧🚨🚧
- Differences from
raylib-cs
- Usage Tips / FAQ
- How to Contribute
🚧🚨🚧 UNDER CONSTRUCTION 🚧🚨🚧
Currently the bindings work, but because these are bare-bones, autogen bindings, they are not user friendly, even for unsafe
use.
Right now only the Core Examples have been ported.
Release timeline
ALPHA
- The current status.
- A Nuget package will be released at that time.
- All the core examples are ported. This ensures a minimal set of convenience wrappers are in place, so things don't get too miserable.
BETA
- Triggered when the
model
andshaders
examples are ported.
RELEASE
- Triggered when all examples are ported. You can contribute to make this happen.
Differences from raylib-cs
raylib-cs |
raylib-cslo |
---|---|
each binding is hand crafted with carefull design | Autogen with wrappers to make the raylib examples work (with minimal changes). Bindings not used in examples will probably be painful to use (example: convert sbyte* to strings). |
Optimized for normal C# usage | Optimized for maximum performance and requires unsafe |
New Raylib version? Harder to detect breaking changes | New Raylib version? Breaking changes are easy to spot and fix |
includes Intellisence docs | No docs. Use the Cheatsheet |
has a long track record | didn't exist till mid november 2021! |
has lots of examples | only the Core examples |
zlib licensed | lgpl licensed |
Nuget Package | just this repo right now |
Stable | in development |
Works with various dotnet flavors? | Focus on DotNet6.0 |
lots of contribs | just little 'ol me |
Usage Tips / FAQ
- Is there a wrapper for this function? or do I have to really cast my Enum to
int
?- The autogen bindings are left untouched, however convenience wrappers are added. Usually these will automagically "work" via function overloads, but where this is not possible, try adding an underscore
_
to the end of the function/property. For example:Camera3D.projection_ = CameraProjection.CAMERA_ORTHOGRAPHIC;
orGesture gesture = Raylib.GetGestureDetected_();
- The autogen bindings are left untouched, however convenience wrappers are added. Usually these will automagically "work" via function overloads, but where this is not possible, try adding an underscore
- I ran the examples in a profiler. What are all these
sbyte[]
arrays being allocated?- A pool of
sbyte[]
is allocated for string marshall purposes, to avoid runtime allocations.
- A pool of
- Why don't you add wrappers for the Math helpers?
- crossing between Managed and Native code isn't free. Better you do all your maths in managed code, and pass the final result to raylib.
- Why are my matricies corrupt?
- Raylib/OpenGl uses column-major matricies, while dotnet/vulkan/directx uses row-major. When passing your final calculated matrix to raylib for rendering, call
Matrix4x4.Transpose(yourMatrix)
- Raylib/OpenGl uses column-major matricies, while dotnet/vulkan/directx uses row-major. When passing your final calculated matrix to raylib for rendering, call
How to Contribute
- assume you are using Visual Studio (or maybe rider?) and can run
dev.sln
- fork the repo, build and try out the example project
- Look at how a lot of the raylib functions used in the core examples have convenience wrappers.
- Pick one of the raylib example groups not being worked on, and let novaleaf know either on discord or via an issue
- port the example group, following the general design as the core examples.
example group | contrib doing port | done? |
---|---|---|
core | novaleaf | [x] |
shapes | [ ] | |
textures | [ ] | |
text | [ ] | |
models | [ ] | |
shaders | [ ] | |
audio | [ ] | |
physics | [ ] |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Toolkit.HighPerformance (>= 7.1.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Raylib-CsLo:
Package | Downloads |
---|---|
RayWrapper.Base
This is the Base package for RayWrapper |
|
Raylib_ImGui
Open-source ImGui renderer for Raylib |
|
RayWork.RLImgui
Imgui.Net integration |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Raylib-CsLo:
Repository | Stars |
---|---|
sinshu/meltysynth
A SoundFont MIDI synthesizer for .NET
|
Version | Downloads | Last updated |
---|---|---|
4.2.0.9 | 10,573 | 3/2/2023 |
4.2.0.9-pre-m1-0 | 5,948 | 3/1/2023 |
4.2.0.8 | 6,082 | 3/1/2023 |
4.2.0.7 | 5,994 | 2/28/2023 |
4.2.0.6 | 6,098 | 2/25/2023 |
4.2.0.5 | 6,241 | 2/6/2023 |
4.2.0.5-alpha1 | 5,842 | 2/2/2023 |
4.2.0.4 | 6,143 | 1/31/2023 |
4.2.0.3 | 8,930 | 9/22/2022 |
4.2.0.2 | 5,755 | 9/20/2022 |
4.2.0.1 | 5,850 | 9/20/2022 |
4.2.0-alpha1 | 5,686 | 9/20/2022 |
4.2.0-alpha0 | 5,519 | 9/19/2022 |
4.0.1 | 8,677 | 4/9/2022 |
4.0.0 | 6,796 | 1/16/2022 |
4.0.0-rc.5.0 | 331 | 12/15/2021 |
4.0.0-rc.4.2 | 173 | 12/11/2021 |
4.0.0-rc.4.1 | 169 | 12/9/2021 |
4.0.0-rc.4.0 | 182 | 12/5/2021 |
4.0.0-rc.3.1 | 943 | 11/29/2021 |
4.0.0-rc.3 | 848 | 11/29/2021 |
4.0.0-rc.2 | 182 | 11/27/2021 |
4.0.0-rc.1 | 2,986 | 11/25/2021 |
4.0.0-rc.0.1 | 5,783 | 11/23/2021 |
4.0.0-rc.0 | 146 | 11/23/2021 |
4.0.0-beta.2 | 157 | 11/22/2021 |
4.0.0-beta.1 | 936 | 11/20/2021 |
4.0.0-beta.0 | 946 | 11/20/2021 |
4.0.0-alpha.2 | 154 | 11/19/2021 |
4.0.0-alpha.1 | 219 | 11/17/2021 |
4.0.0-alpha.0 | 248 | 11/17/2021 |
Alpha release. It works, but check the examples on github.