Skip to main content
gamedev.net
🔒 Locked

problem with D3DXMatrixPerspectiveLH

Started by salman83 Apr 12, 2007 at 2:31 AM 0 replies 2.2k views
Original Post
salman83
salman83
Hi all, First of all, I want to say that I am new to DirectX and right now understanding its basic. Currently, I am facing a problem regarding setting up a projection matrix using D3DXMatrixPerspectiveLH. Here, I am unable to understand the width and height parameters. My question is that whether width and height parameters are screen width and height or are they just camera space width and height. If they are camera space width and height, how they will be calculated. Thank you.
Burla
Burla
The height and width you need is the size of the view window, which is mostly the entire back buffer. So if you have a 800 x 600 window, you use the height 600 and the width 800, and calculate the aspect ratio, like width/height and use that number in the MatrixPerspectiveFovLH.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.