Jump to content

  • Log In with Google      Sign In   
  • Create Account

Cannot compute wNear and wFar from projection matrix


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 DeadMG   Members   -  Reputation: 100

Like
0Likes
Like

Posted 01 April 2012 - 04:41 AM

I'm developing an application in Direct3D9, and the Debug runtime spews the titular error when I attempt to set my projection matrix. I've got the following code:

D3DXMatrixPerspectiveFovLH(
	&Projection,
	D3DXToRadian(90),
	(float)GetDimensions().x / (float)GetDimensions().y,
	NearPlane,
	FarPlane
);
D3DCALL(device->SetTransform(
	D3DTS_PROJECTION,
	&Projection
));


I checked in advance, and I have only one thread, the x and y values are 1920 and 1018 (the dimensions of the client area of my window), and the NearPlane is 0.1f and the FarPlane is 40.0f- I confirmed these values by breakpoint. The only times I've seen this error previously, and the only causes I could find via Google, were when the NearPlane is 0, which is not the case here.

Edit: Never mind, my own silly fault. I accidentally used a bad pointer to call this function.

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS