Hi, I'm fairly new to C++ and graphics programmming and I'm having some troubles with how to decouple my data from other parts of the engine.
I got a Model class which holds all the data of my meshes, shaders, textures, vertex buffers and such. Also i have a graphics class which holds the device and context, and functions assosciated with them. Right now I pass the device and context to the Model class so that it can create the vertexbuffer and shaders; However I would prefer if my model class had no knowledge or dependancy on the device and context. I Guess i could move them to the graphics class and pass it the model, but that would just move the problem.
I have a root class that creates all the other components, input, audio, rendering, etc, would it be a good idea to put code that requires information from several parts here?
/Björn