Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


gder

Member Since 07 Jan 2010
Offline Last Active Aug 04 2014 05:09 PM

Posts I've Made

In Topic: Why texCUBE always return zero?

04 June 2010 - 08:02 PM

Thank you for your hint, now i use D3DXCreateCubeTextureFromFile,it's OK!

In Topic: Why the model has been deformed?

10 January 2010 - 01:04 AM



OK, Thank You! I will try it.

In Topic: Why the model has been deformed?

08 January 2010 - 12:35 PM



ah, I draw a ball, when i move it away from camera center, it is stretched on the side away from camera center. I use directX 9.0 and C++, when i modifed fov to be smaller as panic mentioned, it's ok.
but i found that enen at the camera center, the ball is not complete spherical, but use DirectX Viewer tool, it looks complete spherical.

//
// Set camera.
//
D3DXVECTOR3 pos(0.0f, 0.0f, -10.0f);
D3DXVECTOR3 target(0.0f, 0.0f, 0.0f);
D3DXVECTOR3 up(0.0f, 1.0f, 0.0f);

D3DXMATRIX V;
D3DXMatrixLookAtLH(
&V,
&pos,
&target,
&up);

Device->SetTransform(D3DTS_VIEW, &V);

//
// Set projection matrix.
//

D3DXMATRIX proj;
D3DXMatrixPerspectiveFovLH(
&proj,
D3DX_PI * 0.1f,
(float)Width/(float)Height, //Window size ratio
1.0f,
10000.0f);

Device->SetTransform(D3DTS_PROJECTION, &proj);

PARTNERS