RE: [GD-Windows] Monitor aspect detection
Brought to you by:
vexxed72
From: Nicolas R. <nic...@fr...> - 2003-12-10 01:29:41
|
Ok... I'm not speaking of projection matrices yet... We don't need to dig into that right now :) Speaking of field of views is enough. Let say that I want a hFov of 60=B0 on a 1280x1024 mode. We agree that vFov =3D 2*atan(height * tan(hFov/2) / width). On a 4:3 display vFov should be 45=B0 If I only take into account the display mode vFov would be 48=B0. This case is quite common and not really a problem... Until you need a large hFov, for example 120=B0. Instead of the 90=B0 you should get for vFov, you will have 96=B0. As Jon stated, they are also perfectly pixel-square 1280x1024 LCD modes (5:4 LCD monitors) !!! You have four choices then: - Live with that, and let those squares be rectangles. - Assume user is always on a 4:3 monitor. (bye bye good old 16:9 projector). - Remove the pesky resolutions (those not clearly 4:3, 16:9 or 3:4,...) from user choices. - Try to find an algorithm, working 100% in 90% of cases, and using one of the above choices for the rest. > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Gareth Lewin > Sent: Tuesday, December 09, 2003 8:00 PM > To: gam...@li... > Subject: RE: [GD-Windows] Monitor aspect detection >=20 >=20 > Surely what you are describing means you have a 4x3=20 > backbuffer or projection matrix and you are rendering to a=20 > non 4x3 front buffer ?=20 >=20 |