R3d.Net 0.1.2

dotnet add package R3d.Net --version 0.1.2
                    
NuGet\Install-Package R3d.Net -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="R3d.Net" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="R3d.Net" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="R3d.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add R3d.Net --version 0.1.2
                    
#r "nuget: R3d.Net, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package R3d.Net@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=R3d.Net&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=R3d.Net&version=0.1.2
                    
Install as a Cake Tool

Logo

R3d.Net

C# bindings for R3D, advanced 3D rendering library for raylib

GitHub contributors License Chat on Discord NuGet Version

R3d.Net targets net8.0 and uses the R3D 0.3 or later to build the native libraries. Raylib-cs 7.0.1 is used as nuget dependency.

R3d.Net is heavily inspired by raylib-cs and uses some of its functionality to implement bindings.

Status

Currently in active development, available API is subject to change.

Installation - NuGet

You can add package to the project with this command:

dotnet add package R3d.Net

Installation - Manual

  1. Download/clone the repo

  2. Add R3d.Net/R3d.Net.csproj to your project as an existing project.

  3. Download/clone the original R3D repo with all dependencies.

  4. Build R3D's native dependencies and place them in the same directory as the executable. Required files: r3d.dll and assimp.dll or assimp-vc143-mt.dll.

  5. You should now be able to use R3d.Net in your projects.

Basic R3D example in R3d.Net

using R3d.Net.Types;
using Raylib_cs;
using System.Numerics;

namespace R3d.Net.Examples
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // Initialize raylib window
            Raylib.InitWindow(800, 600, "R3D Example");

            // Initialize R3D Renderer with default settings
            R3d.Init(800, 600, 0);

            // Load a model to render
            // 'true' indicates that we upload immediately to the GPU
            var mesh = R3d.GenMeshSphere(1.0f, 16, 32, true);

            // Get a material with default values
            var material = R3d.GetDefaultMaterial();

            // Create a directional light
            // NOTE: The direction will be normalized
            var light = R3d.CreateLight(LightType.Directional);
            R3d.SetLightDirection(light, new Vector3(-1, -1, -1));
            R3d.SetLightActive(light, true);

            // Init a Camera3D
            var camera = new Camera3D
            {
                Position = new Vector3(-3, 3, 3),
                Target = Vector3.Zero,
                Up = Vector3.UnitY,
                FovY = 60.0f,
                Projection = CameraProjection.Perspective
            };

            // Main rendering loop
            while (!Raylib.WindowShouldClose())
            {
                Raylib.BeginDrawing();
                R3d.Begin(camera);
                R3d.DrawMesh(ref mesh, ref material, Raymath.MatrixIdentity());
                R3d.End();
                Raylib.EndDrawing();
            }

            // Close R3D renderer and raylib
            R3d.UnloadMesh(ref mesh);
            R3d.Close();
            Raylib.CloseWindow();
        }
    }
}

Other examples can be found in the R3d.Net.Examples folder. All examples were ported from the original R3D library.

Contributing

The library still requires a lot of improvements and may contain some issues.

Feel free to open an issue or submit a pull request.

License

Licenced under the Zlib License.

See LICENSE for details.

Acknowledgements

A huge thanks to the original raylib, r3d and raylib-cs developers for their enormous contributions to our raylib community.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 129 8/10/2025
0.1.1 121 8/10/2025