Jump to content
  • Advertisement
Sign in to follow this  

3D DX9 - Projection stretched

This topic is 379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)



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 );



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!