EasyGL 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package EasyGL --version 1.0.2
                    
NuGet\Install-Package EasyGL -Version 1.0.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="EasyGL" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasyGL" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="EasyGL" />
                    
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 EasyGL --version 1.0.2
                    
#r "nuget: EasyGL, 1.0.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 EasyGL@1.0.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=EasyGL&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=EasyGL&version=1.0.2
                    
Install as a Cake Tool

EasyGL

A lightweight, zero-dependency C# OpenGL 2D & 3D rendering library designed for beginners, indie developers, and programmers with dyscalculia.

Features

  • Zero External Dependencies: Talks directly to native Windows OpenGL (opengl32.dll) and WIC (windowscodecs.dll). No SDL2, Raylib, or DirectX 12 required.
  • Accessible 1-to-10 Grid: Place 2D shapes, sprites, and UI using simple grid coordinates (Easy.Grid2D(10)) without complex pixel math.
  • Auto-Resizing & Aspect Safe: Automatically scales viewports, 3D cameras, and 2D UI when the window is resized or maximized.
  • 2D, 3D & Audio: Includes 3D perspective cameras, custom GLSL shader compilation, PNG/JPG texture loading, native WAV/MP3 audio playback, and interactive UI controls.
  • Easy Shader Making Using Easy.Shader

Quick Start Example

using EasyGL;

Easy.Window("EasyGL Spinning Cube", 1280, 720);

Easy.Run(() =>
{
    Easy.Clear(0.08f, 0.10f, 0.15f);

    // 3D Cube
    Easy.Camera3D(0f, 2f, 5f);
    Easy.Cube3D(0f, 0f, 0f, 1.5f, Easy.Time * 45f, 0.25f, 0.75f, 1f);
});

Quick Start Shader Example

using EasyGL;

Easy.Window("EasyGL Shader Demo", 800, 600);

Easy.Run(() =>
{
    Easy.Clear(Colors.Black);

    // 3D Shapes with Shaders
    Easy.Camera3D(0, 3, 10);

    // Rainbow effect on a spinning 3D cube
    Easy.Shader(ShaderEffect.Rainbow);
    Easy.Cube3D(-3, 0, 0, 2f, Easy.Time * 40f, Colors.White);

    // Glow effect pulsing toward Cyan on a 3D pyramid
    Easy.Shader(ShaderEffect.Glow, Colors.Cyan);
    Easy.Pyramid3D(0, 0, 0, 2f, Colors.Purple, Easy.Time * 40f);

    // Wave effect wobbling a 3D sphere
    Easy.Shader(ShaderEffect.Wave);
    Easy.Sphere3D(3, 0, 0, 2f, Colors.Orange);

    // 2D Shapes & UI with Shaders
    Easy.Grid2D(10);

    // Flashing star in 2D !FLASH WARNING!
    Easy.Shader(ShaderEffect.Flash);
    Easy.Star(2, 2, 1.5f, Colors.Yellow, rot: Easy.Time * 30f);

    // Always turn off the shader before drawing normal UI text!
    Easy.Shader(ShaderEffect.None);
    Easy.Text("Easy.Shader Example", 1.5f, 1.2f, Colors.White, 28);
});

Quick Start Input Example

using EasyGL;

Easy.Window("EasyGL Input Demo", 800, 600);

float playerX = 5f;
float playerY = 5f;
float playerSize = 1f;
ColorRGB playerColor = Colors.Cyan;

Easy.Run(() =>
{
    Easy.Clear(Colors.Black);
    Easy.Grid2D(10);

    // Movement (Works with WASD, Arrow Keys, Controller D-Pad, AND Left Thumbstick!)
    playerX += Easy.MoveX() * 5f * Easy.Delta;
    playerY += Easy.MoveY() * 5f * Easy.Delta;

    // Keyboard & Controller Button Presses
    if (Easy.KeyPressed(Key.Space) || Easy.PadPressed(PadButton.A))
    {
        playerColor = Colors.Green; // Press Space or Controller A to turn Green
    }
    if (Easy.KeyPressed(Key.R) || Easy.PadPressed(PadButton.B))
    {
        playerX = 5f;
        playerY = 5f;
        playerColor = Colors.Cyan; // Press R or Controller B to reset
    }

    // Mouse Scroll Wheel (Zooms player size up or down)
    playerSize += Easy.MouseScroll * 0.2f;

    // Mouse Position, Hover & Clicks
    bool hovering = Easy.IsMouseOver(playerX, playerY, playerSize, playerSize);
    if (hovering && Easy.MouseLeftClick)
    {
        playerColor = Colors.Yellow; // Left-click the player to turn Yellow
    }
    if (Easy.MouseRight)
    {
        playerX = Easy.MouseX; // Hold Right-click to drag player to mouse
        playerY = Easy.MouseY;
    }

    // Draw Player & Mouse Cursor
    Easy.Square(playerX, playerY, playerSize, playerColor);
    Easy.Circle(Easy.MouseX, Easy.MouseY, 0.3f, Colors.Pink);

    // UI Instructions
    Easy.Text("Move: WASD / Arrows / Controller Stick", 1f, 1f, Colors.White, 20);
    Easy.Text("Space / Pad A: Green | Right Click: Drag | Scroll: Size", 1f, 1.5f, Colors.Gray, 18);
});
Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows 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.
  • net8.0-windows7.0

    • No dependencies.

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
1.0.5 54 11/14/2026
1.0.4 49 11/14/2026
1.0.3 49 11/14/2026
1.0.2 54 11/14/2026
1.0.1 51 11/13/2026
1.0.0 63 11/13/2026