These examples are direct ports of the original raylib 4.0 examples, with as few modifications made to the original sources as possible.
Some important notes if you want to run/use/copy these examples:
- DotNet 6
global using- Refer to the top of
Program.csto see the varioususingstatements. This allows C# to emulate the scopes used by the original C examples, which lets us make minimal changes to the C code.
- Refer to the top of
- Run this project to see all examples run in order. you can simply comment out examples you don't want in the
Program.csfile - For Math/ConsolePrint/DateTime/FileIo, it would be better that you don't follow the examples, but rather "normal" dotnet workflows like using
System.Io.Fileor math helpers found directly inSystem.Numerics. Invoking native code is relatively expensive, adding perhaps0.001msper call. These native invokes were left as-is so that the original C code could be used with minimal changes.
Here are links to most the examples
Core |
Shapes |
Textures |
Text |
Models |
Shaders |
Audio |
Physics |
|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |















