my question is "What is the best way to structure rendering code".
Is it better to make a class with a render function that iterates through all game objects based on there name or type and have no state manager or is it better to make a class with functions like drawpolygon, drawmesh, drawline and use it in a state class something like this(https://gamedev.stackexchange.com/a/13245/18912). or is there something else that works better ?
Thank you in advance.