John:
For widescreen, what you want is to have the same vertical FOV, but a wider horizontal FOV.
If you take a look at this thread, you'll find a function which lets you set the horizontal FOV:
http://www.blitzbasic.com/Community/posts.php?topic=20921#215264
The default FOV is 90. Standard displays are 4:3. Widescreen displays are either 16:9 or 16:10.
4:3 = 1.33:1
16:9 = 1.77:1
16:10 = 1.6:1
(Yes, those numbers are correct. 16:10 is not as "wide" as 16:9)
If we then normalize the widths:
1.33/1.33 = 1
1.77/1.33 = 1.33
1.6/1.33 = 1.2
So, we need an FOV which is 1.33x as wide for a 16:9 screen, and one which is 1.2x as wide for a 16:10 screen. That means FOV's of approximately 120 and 108.
Please note, these numbers are not exact. 4/3 is actually 1.33333~ repeating. Do the math in the code to get the most accurate results.
Anyway, that's how you can get the results you want. Now you just have to figure out how to determine if the screen is widescreen or not. I guess you'll need to either find some DX functions you can access to do that, or you'll need to come up with a table of resolutions and what aspect ratios go along with them. And if I remember from the other thread, you also will need to correct the FOV for weird resolutions with non square pixels.
For that, you may find this of help:
http://en.wikipedia.org/wiki/Computer_display_standard
For widescreen, what you want is to have the same vertical FOV, but a wider horizontal FOV.
If you take a look at this thread, you'll find a function which lets you set the horizontal FOV:
http://www.blitzbasic.com/Community/posts.php?topic=20921#215264
The default FOV is 90. Standard displays are 4:3. Widescreen displays are either 16:9 or 16:10.
4:3 = 1.33:1
16:9 = 1.77:1
16:10 = 1.6:1
(Yes, those numbers are correct. 16:10 is not as "wide" as 16:9)
If we then normalize the widths:
1.33/1.33 = 1
1.77/1.33 = 1.33
1.6/1.33 = 1.2
So, we need an FOV which is 1.33x as wide for a 16:9 screen, and one which is 1.2x as wide for a 16:10 screen. That means FOV's of approximately 120 and 108.
Please note, these numbers are not exact. 4/3 is actually 1.33333~ repeating. Do the math in the code to get the most accurate results.
Anyway, that's how you can get the results you want. Now you just have to figure out how to determine if the screen is widescreen or not. I guess you'll need to either find some DX functions you can access to do that, or you'll need to come up with a table of resolutions and what aspect ratios go along with them. And if I remember from the other thread, you also will need to correct the FOV for weird resolutions with non square pixels.
For that, you may find this of help:
http://en.wikipedia.org/wiki/Computer_display_standard