Improving the Graphics Layer
Today's goal: Switch from SDL2 to GLFW and get something rendering!
- Special thanks to Felipe Balbi for spending a lot of time improving the quality of the code and build!
Switching to GLFW
Today we're going to spend some time moving the graphics layer from SDL2 to GLFW.
At some point we might even get rid of GLFW, but we'll stick with this path for a while :)
- Direct access to OpenGL rendering APIs without bringing in everything else SDL2 offers
- No unnecessary code for playing sounds and other game-specific functionality
- We can write our own APIs that wrap what GLFW and OpenGL provide
- Have to write our own image loading code
- Have to write our own font handling code
- Have to write optimized rendering routines
But as I've said before, that's the point :)
DONE Figure out a good pattern for starting the render/event loop
DONE Add basic event loop
DONE Add screen clearing function
DONE Add rect rendering function
DONE Delete SDL2 code and dependencies
The code for this stream can be found here: https://github.com/FluxHarmonic/flux-compose/commit/6c53c3893dcd9e224c71cb7658575fe440783aad