2D engine written in C using OpenGL
In my desire to learn OpenGL and to have a renderer from which I could base my hobby projects, I created this renderer which utilises instanced rendering and texture atlases to draw every sprite in a single call.
In the gif above you can see several thousand particles consisting of several randomized sprites being rendered.
It works by rendering all of the textures used in the game onto a single texture atlas. This means that all sprites share the same texture on the GPU. This is not only more performant since it reduces
the amount of binding of textures that needs to be done, but also because it means that all sprites can be rendered in a single draw call.
This is done by saving all the data required to render a sprite
(position, size, e.t.c.) until the end of the frame, and only then actually submitting the draw call containing all the required instance data.
Contact me at: ludvig.thread249@passmail.net