Hello
I'm working on a space game in DX9, and now I'm trying to load mesh texture uv coordinates into my game, but something is wrong. I'm modelling my meshes in 3D Canvas Pro and then I export them in .x files. When I open the mesh with the DirectX Viewer it looks like this...
...but when I render it in my game:
the code that I'm using to load a mesh (I want to load only the vertex data, textures and materials are added ingame):
D3DXLoadMeshFromX( "3d/asteroids/ceres.x", D3DXMESH_SYSTEMMEM, g_pd3dDevice, NULL, &g_pD3DXMB, NULL, NULL, &g_mCeres )
for rendering:
void RenderAsteroid()
{
g_pd3dDevice->SetTexture( 0, g_tCeres );
D3DXMatrixTranslation( &matTranslation, 20.0f, 20.0f, 10.0f );
D3DXMatrixScaling( &matScalation, 10.0f, 10.0f, 10.0f );
D3DXMatrixMultiply( &matWorld, &matScalation, &matTranslation ) ;
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
g_mCeres->DrawSubset(0);
}
What am I doing wrong ?
Any help is welcome :)