Single responsibility principle and dependencies,
Members - Reputation: 1410
Posted 13 September 2012 - 12:56 AM
Following the "Single responsibility principle" I have determined that my game should have its own class for loading and setting up Meshes, and another render class that recieves an array of Meshes to draw. Perhpaps on two different threads.
But the D3DXCreateMesh function is dependent on the LPDIRECT3DDEVICE9 pD3DDevice parameter! How can I have a main rendering thread while a worker thread in the background constantly goes about using the LPDIRECT3DDEVICE9 pD3DDevice?
Do I have to roll my own Mesh class? Can I just ignore it as D3DXCreateMesh does not use this parameter?
Moderators - Reputation: 18034
Posted 13 September 2012 - 01:07 AM