Code:
struct CountryVertex
{
D3DVECTOR3 Pos;
D3DCOLOR Diffuse;
D3DCOLOR Specular;
float tu,tv;
static const DWORD FVF;
CountryVertex(void):Pos(D3DXVECTOR3(0.0f,0.0f,0.0f),Diffuse(0),Specular(0),tu(0.0f),tv(0.0f) {}
CountryVertex(D3DXVECTOR3 _Pos,float u,float v):Pos(_Pos),tu(y),tv(v) {}
};
class Country
{
ID3DMESH9 *m_pMesh;
D3DXVECTOR3 Pos;
D3DMATERIAL9 m_pMaterial;
public:
Country(void):m_pMesh(NULL),Pos(&D3DXVECTOR3(0.0f,0.0f,0.0f)) {}
void Create(IDirect3DDevice9 *pDevice);
...
};
Something like that would work for starters. Each country is a mesh of it's own and to change the color of it you simply change the material property of the mesh.