Hello. I'm trying to make a game in DirectX 11 and I managed to implement a interface system with text and gui. It works fine just that when I take things further and try to make a window, a console system or everything more complicated I make other classes that use the first gui classes that use another classes and functions and so on. I made a resource manager that handles raw data and creates DirectX resources and returns a pointer. I made a Effect class that has all the shaders. The gui uses pointer to resources manager and effect manager and internally creates resources and draws and the gui uses the pointers to font system to draw text and move it accordingly to its position and so on.
So if I want to create a more complicate system of any kind I have to pass pointers like crazy. Pass resource manager/font system/guy system/effects pointer to the Console class, the console class passes those pointers to gui system, the gui system those pointers to text system to create resources/draw etc.
Except the render part where I should optimize later by making a render manager is this a good practice ? I dont mind this system but I dont want to end up later when my project is bigger that I have to change everything.
LE: Also there are global variables that don't change for every object for example the Orthographic Matrix that I should pass to all objects. How can I access those variables without sending them all the time from function to function. If there are too many variables to send I just "pack" them in other classes and pass the pointer in the same way ?
Thanks.