Skip to main content
gamedev.net
🔒 Locked

Error in Direct3D program

Started by BGhost Sep 28, 2006 at 1:36 PM 1 replies 1.2k views
Original Post
BGhost
BGhost
Hello I wrote a program for draw Squre with Direct3D in VC++ 7.0. when compile it, get 2 message error: error C2664: 'D3DXMatrixLookAtLH' : cannot convert parameter 1 from 'D3DMATRIX *__w64 ' to 'D3DXMATRIX *' and error C2664: 'D3DXMatrixPerspectiveFovLH' : cannot convert parameter 1 from 'D3DMATRIX *__w64 ' to 'D3DXMATRIX *' these are 2 line of my codes that have error: D3DXMatrixLookAtLH(&view_matrix,&D3DXVECTOR3(0.0f,0.0f,10.0f),&D3DXVECTOR3(0.0f,0.0f,0.0f),&D3DXVECTOR3(0.0f,1.0f,0.0f)); and D3DXMatrixPerspectiveFovLH(&matProj,D3DX_PI/4,1.33,1.0f,100.0f); please guide me.
musawirali
musawirali
maybe its your matrix declaration. Here's an example that works:

D3DXMATRIXA16 mlightProj;
D3DXMatrixPerspectiveFovLH(&mlightProj,D3DX_PI/4,1.0f, 0.1f, 50.0f );

no errors, and works perfectly. hope this helps.
Agony
Agony
While I've never run into exactly this problem myself (never having had a 64-bit processor and OS), it appears that you're compiling in 64-bit mode, but are using 32-bit DirectX libraries. I'm not entirely sure what to do to fix that, but perhaps you actually don't mean to be compiling in 64-bit mode, and could thus probably change that in the compiler section of your project settings.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas nly, and not for things themselves." - John Locke o

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.