Matrices
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?
Link d3dx9.lib and include d3dx9.h
Also, I use just the simple D3DXMATRIX (not D3DXMATRIXA16)
That will clear up all your errors!
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!
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement