Jump to content
  • Advertisement
Sign in to follow this  
pristondev

3D DX9 - Projection stretched

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)

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.

Share this post


Link to post
Share on other sites
Advertisement

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  

  • 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!