Hi
I have recently started using the DirectX 8 SDK to make a 3D application using Direct3D, however I am having trouble with applying textures to .X objects. I am using the following method to load the .x object:
if( FAILED( m_pObject->Create( m_pd3dDevice, _T("object.x" ) ) )
return D3DAPPERR_MEDIANOTFOUND;
And the following method to render:
m_pObject->Render( m_pd3dDevice );
When the object renders the bits of the model that should have textures are white but the bit that are a plan colour (non textured) render the correct colour.
Do I new to evoke a different method to load the textures separately, if not what am I doing wrong?
(I have all readily checked the obvious, that the texture files are in the same directory as the .X model)
David
I have recently started using the DirectX 8 SDK to make a 3D application using Direct3D, however I am having trouble with applying textures to .X objects. I am using the following method to load the .x object:
if( FAILED( m_pObject->Create( m_pd3dDevice, _T("object.x" ) ) )
return D3DAPPERR_MEDIANOTFOUND;
And the following method to render:
m_pObject->Render( m_pd3dDevice );
When the object renders the bits of the model that should have textures are white but the bit that are a plan colour (non textured) render the correct colour.
Do I new to evoke a different method to load the textures separately, if not what am I doing wrong?
(I have all readily checked the obvious, that the texture files are in the same directory as the .X model)
David