Sign in to follow this  
Quaid Tseng

Source of Directx Viewer?

Recommended Posts

Anybody knows where to get the source of Directx Viewer? Thanks! I have done a .X loader, but it's weird that object presented in my loader has a bit of compression in y-direction with respect to that in Maya. (A character in maya will become a bit shorter in my loader). But the object is alright in Directx Viewer. Where to get the source of Directx Viewer? Or any ideas? Thanks!!

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Maybe your field of view is just too high? Or you screwed up the aspect ratio?


The compression in y-direction is little(about 5%-10%), that if you don't look carefully, you may not notice the difference.

And I am not very familiar with directx,perhaps some
settings I ignored....

I have two lines about the matrix:

D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec );
D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, 1.0f, 1.0f, 1000.0f );

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Maybe your field of view is just too high? Or you screwed up the aspect ratio?


Do you know where these settings are set?
Thanks!

Share this post


Link to post
Share on other sites
Maybe this is the problem:

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT )
{
// Register the window class
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L,
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
"D3DEngine", NULL };
RegisterClassEx( &wc );
// Create the application's window
HWND hWnd = CreateWindow( "D3DEngine", "Quaid Engine",
WS_OVERLAPPEDWINDOW, 0, 0, 800, 800,
GetDesktopWindow(), NULL, wc.hInstance, NULL );



The window size is set:(800, 800)
However, 800 includes the top title line, and the
actual display region has only about(800, 760)
So I can alleviate this by set(0, 0, 800, 840)

But I don't know how to solve this exactly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this