Advertisement

DX9 - Projection stretched

Started by October 31, 2017 09:16 PM
0 comments, last by pristondev 7 years, 3 months ago

I was making some tests on sample (c++/dx9) of dx sdk, and all works good. When I passed the code to my app, the meshes are getting stretched, i dont know why, both use the same code, same camera, same mesh class etc..

 

Image of problem: (left its my app, and right its the same code on dx sample)

45fa7f95d7.jpg

 

I creating my camera this way:


pcCamera->CreateProjectionMatrix( D3DX_PI / 4.4f, (float)RESOLUTION_WIDTH / (float)RESOLUTION_HEIGHT, 20.0f, 4000.0f );

fCameraFov		= fFov;
fCameraAspect		= fAspect;
fCameraNearPlane	= fNearPlane;
fCameraFarPlane		= fFarPlane;
D3DXMatrixPerspectiveFovLH( &sProjection, fCameraFov, fCameraAspect, fCameraNearPlane, fCameraFarPlane );

lpD3DDevice->SetTransform( D3DTS_PROJECTION, &sProjection );

 

Thanks.

This topic is closed to new replies.

Advertisement