Loading a .X model in DirectX 9

╄→гoц情女王★ 提交于 2019-12-02 01:13:38

When I was learning DirectX 9, this site was a good place to look for information.

In a nutshell, you have to call D3DXLoadMeshFromX or one of its derivative functions to load the mesh object from a file (or memory).

You cannot "move" the object per se, you have to push/pop matrices to accumulate a translation/rotation for each object. e.g for a rotation:

float fAngle = 2.f;
D3DXMATRIXA16 matWorld;
D3DXMatrixIdentity(&matWorld); // Identity Matrix
D3DXMatrixRotationY( &matWorld, fAngle );
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!