Thread: RE: [GD-Windows] Monitor aspect detection
Brought to you by:
vexxed72
From: Phil T. <ph...@mi...> - 2003-12-09 17:49:31
|
I think these are only going to work if the monitor is correctly identified (i.e. through plug-n-play); otherwise, if the monitors are using the generic drivers/settings there is no way for GDI to return the real information. Phil -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Nicolas Romantzoff Sent: Tuesday, December 09, 2003 9:43 AM To: gam...@li... Subject: RE: [GD-Windows] Monitor aspect detection Hi ! Thanks for reminding me that GDI function ! Had already looked into it, alas ASPECTX and ASPECTY always returned identical values whatever mode was selected, and whatever monitor I was using. Looks like ASPECTX=3DASPECTY for screen ! (btw, never understood the "meaning" of ASPECTXY... But who cares). Gave it another try today, but this time using the "HORZSIZE" and "VERTSIZE" I completely missed the first time... And those seem to work ! So... Using the current mode resolution and those HORZSIZE/VERTSIZE values, I've finally been able to compute a correct aspect whatever the mode is (at least on my machine). Still have to try it on some weird LCDs and settings, but hope is back ! Thanks everyone ! Nicolas > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of brian sharon > Sent: Tuesday, December 09, 2003 4:11 PM > To: gam...@li... > Subject: Re: [GD-Windows] Monitor aspect detection >=20 >=20 > Does GetDeviceCaps() give you a clue about whether pixels are=20 > square? =20 > I'm thinking specifically of the ASPECTX and ASPECTY arguments. >=20 > --brian >=20 >=20 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 |
From: Gareth L. <GL...@cl...> - 2003-12-09 19:02:57
|
Surely what you are describing means you have a 4x3 backbuffer or projection matrix and you are rendering to a non 4x3 front buffer ? > -----Original Message----- > From: Nicolas Romantzoff [mailto:nic...@fr...] > Sent: 09 December 2003 17:50 > To: gam...@li... > Subject: RE: [GD-Windows] Monitor aspect detection > > > Hi, > > Well, frankly not really an obsession, but had a bug-report on > point-lights lighting not being spherical. In fact, the lighting was > making a ellipsoid mark instead of a circular one. Trust me, this was > really obvious, and the only reason was the 1280x1024 resolution. > > I know some games do "remove" those resolutions, and propose the > 1280x960 instead, but never found that removing options from the user > was a nice way of correcting "bugs". > > The other reason for that is handling the "new" features of some LCD > monitors being put vertically instead of horizontally. This could have > been patched by simply comparing width and height, but that's a very > unnatural ugly way of doing it ! :) > > Nicolas. > > > > -----Original Message----- > > > > I'm quite curious why this obsession, though: is it just to > > get it "right" or is there some virtual/physical match-up > > issue involved? Could you go the other way, and ask that the > > user adjusts his/her monitor so that the pixels are square? > > Perhaps ship a ruler in the box? > > > > Cheers, > > > > / h+ > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |
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 |
From: Jason B. <ja...@in...> - 2003-12-10 09:38:06
|
>>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. If it was an option I'd go with number 4 but add an explicit "calibration" menu to your graphics setup. This would allow for FOV adjustment (i.e. "press left/right cursors until this looks square") along with other usual suspects - gamma/colour/contrast balance etc. Its seems you're going to have to except that there's just no way of telling what the user is seeing unless they tell you somehow. Jason. |