Original Post
I was wondering how I sould go about making an ''application'' class like the kind in the DX common framework that encupsulates the device interface. The encapsulation part would be straightforward enough but how do I make it so that the CMesh objects in there somewhere could access the device that belongs to the class that owns the mesh?
In other words how would I make this work...
thanks
~Vendayan
class App
{
public:
bool init();
bool run();
private:
IDirect3Device8 myDevice;
Mesh myMesh;
}
class Mesh
{
public:
bool Draw{};
private:
sVertex Verts[10];
}
bool Mesh::Draw()
{
// How do I get access to the device here to do my drawing?
return false; // :(
}