Descent3/legacy
Ryan C. Gordon 393a39b709
opengl: use SDL_WINDOW_FULLSCREEN_DESKTOP and an FBO.
This now renders to an OpenGL Framebuffer Object at the game's resolution,
and blits it to the window at whatever resolution it is currently using,
scaling and letterboxing if necessary.

Which is to say: display resolutions are now imaginary, and we never change
the physical display mode now. A smaller resolution is simply drawing less
pixels and scaling them up with the GPU for display. This solves a few
problems: no more resizing background windows or desktop icons shuffling
around, no more being stuck in a weird resolution when debugging or if the
game crashes, no more waiting on monitors to click over to a new mode, and
no more weird rendering when the display didn't exactly support the requested
mode.

This also means the game doesn't have to drop down to 640x480 for the config
menu screen when it was otherwise using some other resolution.

Some caveats:

- This _requires_ OpenGL Framebuffer Object support; there is currently no
fallback if it's missing and the game will refuse to start. But any desktop
hardware of the last ~20 years should support it. For weird embedded things
or whatnot, it will be possible to add a fallback.

- This currently requires SDL. The OpenGL pieces should work on Windows, but
someone would need to adjust the existing win32 code to create a fullscreen
window and not change the physical display mode. It should still compile on
windows and work as before (untested by me, though).

- This is only OpenGL; it does not touch the Direct3D renderer, which should
continue to work as before (again, untested by me).
2024-06-14 03:56:49 -04:00
..
briefinglocalizer
D3Launch Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
FontEditor Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
hogedit Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
hogmaker Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
inetfile Replace ioctl with fcntl, fix ioctlsocket calls (64-bit fix) 2024-05-24 18:24:40 -04:00
musicutils Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
powerball Replace _finite with std::isfinite 2024-06-02 14:50:51 -04:00
renderer opengl: use SDL_WINDOW_FULLSCREEN_DESKTOP and an FBO. 2024-06-14 03:56:49 -04:00