Advertisement

Matrices

Started by March 22, 2003 03:58 PM
3 comments, last by cleves 21 years, 7 months ago
Ok i tried to compile this piece of code: VOID SetupMatrices() { // For our world matrix, we will just rotate the object about the y-axis. D3DXMATRIXA16 matWorld; // Set up the rotation matrix to generate 1 full rotation (2*PI radians) // every 1000 ms. To avoid the loss of precision inherent in very high // floating point numbers, the system time is modulated by the rotation // period before conversion to a radian angle. UINT iTime = timeGetTime() % 1000; FLOAT fAngle = iTime * (2.0f * D3DX_PI) / 1000.0f; D3DXMatrixRotationY( &matWorld, fAngle ); g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld ); } I linked all the right things but he writes this problems: error C2065: ''D3DXMATRIXA16'' : undeclared identifier error C2146: syntax error : missing '';'' before identifier ''matWorld'' error C2065: ''matWorld'' : undeclared identifier error C2065: ''D3DX_PI'' : undeclared identifier error C2065: ''D3DXMatrixRotationY'' : undeclared identifier What could be wrong?
I dont use direct x but could it be you havnt linked somthing you should have?
Advertisement
Link d3dx9.lib and include d3dx9.h

Also, I use just the simple D3DXMATRIX (not D3DXMATRIXA16)

That will clear up all your errors!
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
Link d3dx9.lib and include d3dx9.h

Also, I use just the simple D3DXMATRIX (not D3DXMATRIXA16)

That will clear up all your errors!
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
Ok thanks it worked!

Thanks again!

[edited by - Cleves on March 23, 2003 7:22:01 AM]

This topic is closed to new replies.

Advertisement