Advertisement Jump to content
Sign in to follow this  
briandra3

How to do Widescreen?

This topic is 4910 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

Hi, I am wondering how to program DirectX to check for and use a widescreen display mode... I can't find any details on it. I'm using DirectX 9.0 C December 2004 edition. Is it simply a matter of enumerating display modes that are 16:9? Do I have to upgrade to a newer DirectX SDK? Thanks, Brian

Share this post


Link to post
Share on other sites
Advertisement
Try to set your projection matrix using something like this:

float fAspect = Width / Height;
int screentype = (widescreen) ? 2 : 4;

D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/screentype, fAspect, minZ, maxZ );


I don’t know if this is the suggested way, but it seems to work.

Quad

Share this post


Link to post
Share on other sites
Yes; just find the display modes that have roughly the ratio you want. Then set the projection matrix to the same X/Y ratio as the actual display mode.

Note that many "widescreen" displays are really about 16:10 rather than 16:9. There's also the "tallscreen" mode of 1280x1024, which is about 5:4 instead of 4:3.

Share this post


Link to post
Share on other sites
Yes, your monitor will provide it's supported resolutions to Windows, and your display driver will provide that list minus the resolutions your card doesn't support to you. If you can set your desktop resolution to a widescreen resolution you should be able to use the same resolution from D3D.

And adjust your projection parameters as QuadMV suggests.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!