#7 [TIP]ca3d_miniview_d3d :D3DXMatrixPerspectiveFovRH()

closed-fixed
nobody
5
2003-12-06
2003-04-06
Anonymous
No

[TIP]ca3d_miniview_d3d : D3DXMatrixPerspectiveFovRH
()

ca3d_miniview_d3d.exe ( viewer.cpp , Line:623)
Bruno spoke,
/*
I got problem with D3DXMatrixPerspectiveFovRH or
D3DXMatrixPerspectiveFovLH
I did'nt got the same result that in OpenGL version, thus
I do the work here
*/

I find that to solving this problem.

/*{chowookrea@hotmail(icq74456993)2003-04-07오전
12:01:00
[ x y z w ] * | +1 0 0 0 | = [ X Y Z W ]
| 0 0 +1 0 |
| 0 +1 0 0 |
| 0 0 0 +1 |
this matrix change [3ds max coord]->[d3d coord]
(+x,+y,+z) --------> (+x , +z , +y )
}chowookrea@hotmail(icq74456993) 2003-04-07오전
12:01:01*/

D3DXMATRIX mCal;
memset(&mCal , 0 , sizeof(mCal) );
mCal._11 = mCal._23 = mCal._32 = mCal._44 = 1.f;
m_matWorld = m_matWorld * mCal;

g_pD3DDevice->SetTransform( D3DTS_WORLD,
&m_matWorld );

D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4,
m_width / m_height, m_scale * 50.0, m_scale * 1000.0 );
g_pD3DDevice->SetTransform( D3DTS_PROJECTION,
&matProj );

cal3dModel.renderModel();

Discussion

  • Logged In: YES
    user_id=412276

    No, this isn't the problem, in short with
    D3DXMatrixPerspectiveFovRH models look "fatter" that with
    OpenGL

     
    • status: open --> open-fixed
     
    • status: open-fixed --> closed-fixed