Welcome to your OpenGL learning journey! This repository contains a complete beginner-to-advanced course for learning OpenGL graphics programming in C#/.NET using Silk.NET.
cd src/Phase1_Foundation/1.1_EmptyWindow
dotnet runYou should see a window open with a dark blue background. Congratulations - you've just run your first OpenGL program!
OpenGLLearning/
├── OpenGLLearning.sln # Visual Studio solution
├── README.md # This file
├── PROJECT_STATUS.md # Current progress tracker
├── .gitignore # Git ignore rules
└── src/
└── Phase1_Foundation/
├── README.md # Phase 1 guide and tutorials
└── 1.1_EmptyWindow/ # Your first OpenGL project
This course is divided into 6 phases, taking you from complete beginner to confident OpenGL developer.
- ✅ 1.1: Empty window that opens and closes
- ✅ 1.2: Window with changing background colors
- ✅ 1.3: Responding to keyboard/mouse input
- ✅ 2.1: Colored Triangle - VBO, VAO, Shaders, Pipeline
- ✅ 2.2: Multi-Color Triangle - Gradients & GPU Interpolation
- ✅ 2.3: Rotating Triangle - Matrices & Transformations
- ✅ 2.4: Multiple Shapes - Index Buffers (EBO)
- ✅ 3.1: Textured Quad - Load and display images (with aspect-preserving variant 3.1b)
- ✅ 3.2: Sprite Animation - Sprite sheets with auto-calculated UVs
- ✅ 3.2b: Sprite Animation 2x4 - 2 rows × 4 columns with spacing/padding support
- ✅ 3.2c: Multi-Sheet Animation - Enhanced controls with continuous key holding
- ✅ 3.3: Moving Sprites - Player + enemies with physics, collision, AI
- ⏳ 3.4: Simple 2D Game - Pong or Breakout!
- ⏳ 3.5: Particle System - Effects
- 3D coordinate systems
- Camera system
- Lighting (Phong model)
- Loading 3D models
- Shadow mapping
- Normal mapping
- Post-processing effects
- Skybox
- Build a complete 3D application
- Combine all learned concepts
- Create something impressive!
Total Time: 8-12 weeks (at 1-2 hours daily)
- PROJECT_STATUS.md - See current progress and next steps
- src/Phase1_Foundation/README.md - Detailed Phase 1 guide
- [Learning Plan] - Full roadmap with all projects and concepts (see plan file)
- .NET 9.0 - Modern C# development
- Silk.NET 2.22.0 - OpenGL bindings for .NET
- Silk.NET.OpenGL - OpenGL API
- Silk.NET.Windowing - Window creation
- Silk.NET.Maths - Graphics math
- Silk.NET.GLFW - Cross-platform windowing
- .NET 9.0 SDK or later
- Windows, macOS, or Linux
- Graphics card with OpenGL 3.3+ support
- Any code editor (Visual Studio, VS Code, Rider, etc.)
# Check .NET version
dotnet --version
# Should show 9.0.x or later- Type, Don't Copy: Type out the code yourself to build muscle memory
- Read the Comments: Every project has extensive inline documentation
- Experiment: Change values, break things, and fix them
- Take Breaks: Learning graphics programming can be intense
- Ask Questions: If stuck, review the README files and comments
- Track Progress: Check off completed projects in PROJECT_STATUS.md
By the end of this course, you'll have built:
- 24 progressively complex projects
- Your own 2D game (Pong or Breakout clone)
- 3D scenes with lighting and shadows
- A model viewer
- A final showcase project of your choice:
- 3D Scene Explorer, or
- Simple 3D Game, or
- Graphics Tech Demo
- Learn OpenGL - Excellent OpenGL tutorial
- OpenGL Tutorial
- Shader Toy - GLSL shader playground
- GLSL Sandbox - Another shader editor
-
Verify the build:
dotnet build OpenGLLearning.sln
-
Run the first project:
cd src/Phase1_Foundation/1.1_EmptyWindow dotnet run -
Read the code: Open
src/Phase1_Foundation/1.1_EmptyWindow/Program.csand read through all the comments. -
Experiment: Try the experiments listed in
src/Phase1_Foundation/README.md -
Move forward: Once comfortable, we'll build Project 1.2!
See PROJECT_STATUS.md for:
- Current phase and project
- Completed projects checklist
- Next steps
- Overall progress percentage
If you get stuck:
- Check the README in the current phase folder
- Read the inline code comments
- Review the PROJECT_STATUS.md for common issues
- Make sure your graphics drivers are up to date
You have everything you need to start learning OpenGL. The first project is already complete and ready to run.
Your first step: Run the 1.1_EmptyWindow project and see your first OpenGL window!
cd src/Phase1_Foundation/1.1_EmptyWindow
dotnet runHappy coding! 🚀✨
Current Status: Phase 3 IN PROGRESS — 3.1, 3.2, 3.2b, 3.2c, 3.3 complete ✅
Run examples (PowerShell):
# Phase 3 Projects
dotnet run --project src/Phase3_2D/3.1_TexturedQuad/3.1_TexturedQuad.csproj
dotnet run --project src/Phase3_2D/3.1b_TexturedQuad_PreserveAspect/3.1b_TexturedQuad_PreserveAspect.csproj
dotnet run --project src/Phase3_2D/3.2_SpriteAnimation/3.2_SpriteAnimation.csproj
dotnet run --project src/Phase3_2D/3.2b_SpriteAnimation_2x4/3.2b_SpriteAnimation_2x4.csproj
dotnet run --project src/Phase3_2D/3.2c_SpriteAnimation_MultiSheet/3.2c_SpriteAnimation_MultiSheet.csproj
dotnet run --project src/Phase3_2D/3.3_MovingSprites/3.3_MovingSprites.csproj
Note: PowerShell doesn't support '&&'. Run commands separately or use dotnet run --project as shown.