This was how rendering in my engine was done before…
Everything wrong with the old system
creating a new material prototype was a huge pain : materials had to be sorted manually into their respective renderers
to access a material one must go through a renderer that uses that specific material prototype
rendering materials is a huge pain
in order to update the view and projection matrices, the user must manually access the shader of the rendererer(material prototype of the renderer)
This is how rendering in my engine is done now… and it makes me so happy
Everything great with the new system
initializing a new material prototype is so so so much easier as the material_handler automatically sorts all the rendering shenanigans
rendering is… I don’t even need to say it as it speaks for itself - it’s 1 line (don’t worry the rendering is still very customizable with the initializations prior to the game loop)