OpenGL experiments
This is just a means for me to tinker around with OpenGL and get a fundamental grasp of how to perform 3D rendering for video games from C++. In this journey, I am using C++ and am following the Learn OpenGL tutorial to learn OpenGL.
Currently tested to run on Windows only, but should compile and work for Linux (CI soon:tm:). Builds with Clang 18.1.1 targeting x86_64-pc-windows-msvc
.
Checklist of things I want to do of varying complexity, in no particular order:
- Get a basic GL app working (using SDL2)
- Abstract a basic OpenGL rendering engine
- Get basic 3D rendering working (using cglm)
- Finish LearnOpenGL tutorial and whatever else
- Mess with boolean operations for sculpting 3D meshes
- Experiment with shaders
- Shadow mapping
- Shadow volumes that are then stenciled (and get this working with a vertex or geometry shader)
- Post processing effects (MSAA, SSAA, FXAA, bloom, color correction, blurring, sunrays)
- PBR materials
- Atmospheric effects (God rays, clouds, fog, haze, glare)
- Have a nice shader development pipeline, since I realize shaders get more complex as visual effects become more varied
- Eventually migrate over to SDL2 and start processing inputs from KB+M and a gamepad
- Experiment with getting this on Linux and Android and WASM (GL ES)
- Experiment with 3D audio with SDL2 audio
- Experiment with particles, soft particles, whatever else
- Ambient occlusion with a fragment shader (SSAO/HBAO)
- High refresh rate rendering
- 3D camera controls
- Basic physics with BulletPhysics
- libsm64 support
Resources I have collected that I have found useful:
High level info:
- LearnOpenGL
- All LearnOpenGL C++ chapter examples
- ogldev
- hello triangle by Anton Gerdelan (more)
- hello triangle by Alexander Overvoorde
- Debugging in OpenGL
Shadow volumes:
- Wikipedia article on it
- Shadow Algorithms for Computer Graphics from SIGGRAPH
- GameDev post on "The Theory of Stencil Shadow Volumes"
- Carmack on shadow volumes
- Shadow volume extrusion w/ VS
- NVIDIA dev article excerpt of GPU rendering book doing this w/ a GS and occlusion
- Pauls Projects technical info on this
- Pauls Projects impl. of this
- Silhouette detection from ogldev
- Stencil shadow volume from ogldev
- Some tutorial on shadow volumes
- nVidia article from McGuire
- Presentation on this
- StackOverflow thing on silhouette detection/edge detection with overlapping bodies
- Shadow volumes from dev fjord
- Ogre C++ impl.
Shadow mapping:
- LearnOpenGL explainer
- Wikipedia page on it - see "Principle of a shadow and a shadow map"
Soft particles:
PBR:
Post Processing effects:
- LearnOpenGL DoF
- LearnOpenGL Bloom - get highlighted frags, blur, then composite :D
bigworld is licensed under the MIT license. A copy of it has been included with bigworld.
bigworld uses the following third-party libraries:
- cxxopts, a header-only C++ argument parser library, licensed under the MIT license
- glad, a header-only C++ OpenGL function loader library, licensed under the MIT license
- SDL2, a cross-platform development library, licensed under the zlib license
- SDL2_mixer, a cross-platform audio library, licensed under the zlib license