Irodori 0.0.8

dotnet add package Irodori --version 0.0.8
                    
NuGet\Install-Package Irodori -Version 0.0.8
                    
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="Irodori" Version="0.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Irodori" Version="0.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Irodori" />
                    
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 Irodori --version 0.0.8
                    
#r "nuget: Irodori, 0.0.8"
                    
#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 Irodori@0.0.8
                    
#: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=Irodori&version=0.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Irodori&version=0.0.8
                    
Install as a Cake Tool

banner

irodori

means "to color" in Japanese

a rendering library written in C#

install

dotnet package add Irodori
dotnet package add Irodori.Backend.OpenGL
dotnet package add Irodori.Windowing.Sdl2

features

  • easy to use & simple
    • just a few lines to create a window and render something
  • null safety
    • no null reference exceptions!
  • type strict
    • minimum implicit conversions, most things are explicit.
  • zero throws
    • no exceptions thrown during runtime by the library. don't worry about unexpected crashes.
    • use IrodoriReturn to handle errors explicitly.
  • NativeAOT ready
    • zero reflection, works with NativeAOT

minimal example

window

using Irodori;
// ...

var gfx = Gfx<OpenGlBackend, SdlWindow>.Create()
    .WithBackend(new OpenGlBackend())
    .WithWindowing(new Sdl2Windowing())
    .WithWindowConfig(new Window.InitConfig
    {
        Title = "SampleDraw",
        Width = 1280,
        Height = 720,
        Resizable = false
    })
    .Init()
    .Unwrap();

while (!gfx.Window.ShouldClose)
{
    gfx.Window.PollEvents();
    gfx.Clear(Color.CornflowerBlue);
    gfx.Window.SwapBuffers();
}

triangle

string vshCode = @"
#version 330 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;

out vec3 ourColor;

void main()
{
    gl_Position = vec4(aPos, 1.0);
    ourColor = aColor;
}
";

string fshCode = @"
#version 330 core
out vec4 FragColor;
in vec3 ourColor;

uniform float factor;

void main()
{
    FragColor = vec4(ourColor, 1.0) * factor;
}
";
        
var gfx = Gfx<OpenGlBackend, SdlWindow>.Create()
    .WithBackend(new OpenGlBackend())
    .WithWindowing(new Sdl2Windowing())
    .WithWindowConfig(new Window.InitConfig
    {
        Title = "SampleDraw",
        Width = 1280,
        Height = 720,
        Resizable = false
    })
    .Init()
    .Unwrap();

var vsh = gfx.CreateShader(EShaderType.Vertex, vshCode)
    .Compile()
    .Unwrap();
var fsh = gfx.CreateShader(EShaderType.Fragment, fshCode)
    .Compile()
    .Unwrap();
var prog = gfx.CreateShaderProgram()
    .AttachShader(vsh)
    .AttachShader(fsh)
    .Link()
    .Unwrap();

vsh.Dispose();
fsh.Dispose();

var vertexData = VertexData.Create<Vector3, Vector3>()
    .AddVertex(new Vector3(-0.5f, -0.5f, 0.0f), new Vector3(0.0f, 0.0f, 1.0f))
    .AddVertex(new Vector3(0.5f, -0.5f, 0.0f), new Vector3(0.0f, 1.0f, 0.0f))
    .AddVertex(new Vector3(0.0f, 0.5f, 0.0f), new Vector3(1.0f, 0.0f, 0.0f));

var vertexBuffer = gfx.CreateVertexBuffer(VertexBufferFormat.Create()
        .AddAttrib(VertexBufferFormat.Attrib.Vector3())
        .AddAttrib(VertexBufferFormat.Attrib.Vector3()))
    .Upload(vertexData)
    .Unwrap();

float t = 0;

while (!gfx.Window.ShouldClose)
{
    gfx.Window.PollEvents();
    gfx.Clear(Color.CornflowerBlue);

    prog.SetFloat("factor", (MathF.Sin(t) + 1) / 2.0f); // Flicker effect
    vertexBuffer.Draw(prog);

    t += 0.1f;
    gfx.Window.SwapBuffers();
}

supported backends

  • opengl
  • vulkan
  • direct3d 11
  • direct3d 12
  • metal
  • webgl
  • webgpu
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Irodori:

Package Downloads
Irodori.Windowing.Sdl2

SDL2 Windowing Backend for Irodori

Irodori.Backend.OpenGL

OpenGL Rendering Backend for Irodori

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.8 246 9/28/2025
0.0.7 214 9/28/2025
0.0.6 175 9/27/2025
0.0.5 171 9/27/2025
0.0.4 187 9/27/2025
0.0.3 267 9/3/2025
0.0.2 254 8/31/2025
0.0.1 264 8/30/2025