A low-level OpenGL rendering engine built with Silk.NET, demonstrating manual GPU resource management for various material types through custom textures, shaders, and mesh pipelines, bypassing high-level abstractions to directly manage the full vertex processing stage.
Explore low-level graphics programming by building a rendering pipeline from scratch using Silk.NET's direct OpenGL bindings. Each rendered model showcases a different material type (marble, chipboard, polished metal, concrete, mirror) with manually configured geometry buffers, dedicated GLSL shader programs, and custom texture pipelines. The project serves as a reference implementation for understanding the GPU buffer lifecycle without engine-level abstractions.
The rendering pipeline is built on three core OpenGL buffer objects, each serving a distinct role in the vertex processing stage:
| Buffer | Role | Purpose |
|---|---|---|
| VBO | Vertex Buffer Object | Stores raw vertex attribute data (positions, normals, UVs) in GPU memory |
| EBO | Element Buffer Object | Enables indexed rendering, eliminating redundant vertex data |
| VAO | Vertex Array Object | Encapsulates the complete vertex attribute configuration |
Each vertex
The stride across attributes is computed as:
The EBO stores index triplets referencing the VBO, reducing memory from
The VAO binds VBOs and EBOs together with attribute pointers. Each attribute
A single glBindVertexArray call restores the entire vertex specification state.
Each material is driven by a dedicated GLSL shader program (vertex + fragment), compiled and linked at runtime. Shader uniforms control material-specific parameters such as specular intensity, reflection mapping, and texture blending.
Each model demonstrates a distinct material pipeline with custom shader logic and texture configuration.
| Model | Material | Technique |
|---|---|---|
| Skull | Marble | Diffuse + normal mapping with stone texture |
| Spiral | Chipboard | Layered wood grain texture with subtle specularity |
| Diamond | Polished Metal | High-specular reflection with environment sampling |
| Icosahedron | Concrete | Rough diffuse surface with low reflectance |
| Möbius Strip | Mirror | Reflective environment mapping |
Skull (Marble) · Spiral (Chipboard)
Diamond (Polished) · Icosahedron (Concrete)
Moebius Strip (Mirror)
| Mode | Key | Action |
|---|---|---|
| Settings Mode | Space |
Enter observation mode |
| Observation Mode | W A S D + LMB |
Navigate the scene |
| Observation Mode | Space |
Return to settings mode |
git clone https://github.com/maybebool/GraphicsProgramming.git
cd GraphicsProgramming
dotnet restore
dotnet runPrerequisites: .NET SDK 6.0+, GPU with OpenGL 4.x support.
| Category | Technology |
|---|---|
| Runtime | .NET (C#) |
| GPU Bindings | Silk.NET — low-level .NET bindings for OpenGL |
| Shading | GLSL — custom vertex and fragment shaders per material |
| Rendering | Manual VBO/EBO/VAO management, indexed draw calls |
This project focuses on the fundamentals of manual GPU buffer management and material-specific shading. Possible extensions include:
- Physically-based rendering (PBR) with Cook-Torrance BRDF
- Shadow mapping (directional + point light shadow volumes)
- Deferred rendering pipeline for multi-light scenes
- Normal mapping and parallax occlusion across all materials
- Model loading via Assimp for arbitrary mesh import
- Post-processing passes (bloom, SSAO, tone mapping)





