Exercises based on the https://learnopengl.com/ tutorials, using F# and SILK.NET as the OpenGL wrapper. Each title that has a link is pointing to the original chapter from the learnopengl.com site, in which the theory is explained and all of the math is being copied from.
This repo can be useful if you are following the excelent tutorials on your own and get stuck on some of them (pointer manipulation is a bitch), but please note that this code is not supposed to set any guideline about how you should structure your own projects. It´s just the result of me trying to learn OpenGL, F#, FRP and functional programming in general, so expect the code to be suboptimal at best.
Also note that the 'Galante' library i wrote here is just a set of helpers i needed along the way and will need a complete refactor once i have a better understanding about OpenGl, but that´s not likely to happen within this repo.
From exercise 47 and onward, DearImGui is used to display an informative overlay, but this seems to be working only in my PC for some reason. I don't know what's going on (might be driver related) but I'll try to get it to work properly.
- Getting started
- Hello window (Original article)
- Hello triangle (Original article) and Shaders (Original article)
- Textures (Original article)
- Transformations (Original article)
- Coordinate systems (Original article)
- Camera (Original article)
- Lighting
- Colors (Original article)
- Basic lighting (Original article)
- Materials (Original article)
- Lighting maps (Original article)
- Light casters (Original article)
- Multiple lights (Original article)
- Model loading
- Model loading (Original article)
- Advanced OpenGL
- Depth testing (Original article)
- Stencil testing (Original article)
- Blending (Original article)
- Face culling (Original article)
- Framebuffers (Original article)
- Cubemaps (Original article)
- Advanced data (Original article)
- No visual representation.
- Advanced GLSL (Original article)
- Geometry shader (Original article)
- Instancing (Original article)
- Anti aliasing (Original article)
- Advanced lighting
- Advanced lighting (Original article)
- Gamma correction (Original article)
- Shadow mapping (Original article)
- Point shadows (Original article)
- Normal mapping (Original article)
- Parallax mapping (Original article)
- HDR (Original article)
- Coming soon.
- Bloom (Original article)
- Coming soon.
- Deferred shading (Original article)
- Coming soon.
- SSAO (Original article)
- Coming soon.
- PBR (physically based rendering)
- Lighting (Original article)
- Coming soon.
- IBL - Image Based Lighting - Diffuse irradiance (Original article)
- Coming soon.
- IBL - Image Based Lighting - Specular IBL (Original article)
- Coming soon.
- Lighting (Original article)
- In practice
- Coming soon.
This one looks kind of weird because the images are not centered vertically, the intention is to be forced to realize that rotations in OpenGL are calculated taking the origin as the rotation center (and not the object's center) and if a rotation of an object is needed around itself, then said object must be translated to the origin, rotated and then translated back to it's initial position, which may be somewhat counterintuitive.
W forward | A left | S back | D right | SHIFT_LEFT down | SPACEBAR up | MOUSE_MOVE for camera | MOUSE_WHEEL zoom in/out
Note how the reflection of the light moves on each face of the cube when the camera moves.
Note that although this light source looks similar as in the previous examples, this time it's not reaching the objects that are too far away from it, giving a more realisting feel to the source.
Only half of the faces are rendered. For demonstration purposes, the front faces were removed this time.
No visual representation.
Rendering 100.000 asteroids went from 4 FPS to 80+ FPS when started using the instanced model matrix array.
Coming soon.
Coming soon.
Coming soon.
Coming soon.
Coming soon.
Coming soon.
Coming soon.
Coming soon.