Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using .X Object in Visual Studio

Status
Not open for further replies.

Dolman

Programmer
Feb 3, 2002
8
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top