Commit Graph

9 Commits

Author SHA1 Message Date
Bill Currie acffacc59b [renderer] Make screen capture support asynchronous operation
This fixes (*ahem*) the vulkan renderer segfaulting when attempting to
take a screenshot. However, the image is upside down. Also, remote
snapshots and demo capture are broken for the moment.
2022-04-01 01:01:53 +09:00
Bill Currie 495dd759f0 [renderer] Clean up FOV and viewport handling
Viewport and FOV updates are now separate so updating one doesn't cause
recalculations of the other. Also, perspective setup is now done
directly from the tangents of the half angles for fov_x and fov_y making
the renderers independent of fov/aspect mode. I imagine things are a bit
of a mess with view size changes, and especially screen size changes
(not supported yet anyway), and vulkan winds up updating its projection
matrices every frame, but everything that's expected to work does
(vulkan errors out for fisheye or warp due to frame buffer creation not
being supported yet).
2022-03-30 14:55:32 +09:00
Bill Currie 00362e9f4e [gl] Explicitly request compatibility profile
And core profile for glsl
2022-03-25 09:01:11 +09:00
Bill Currie 0c437492b4 [renderer] Move to using dynamic frame buffers
For now, OpenGL and Vulkan renderers are broken as I focused on getting
the software renderer working (which was quite tricky to get right).

This fixes a couple of issues: the segfault when warping the screen (due
to the scene rendering move invalidating the warp buffer), and warp
always having 320x200 resolution. There's still the problem of the
effect being too subtle at high resolution, but that's just a matter of
updating the tables and tweaking the code in D_WarpScreen.

Another issue is the Draw functions should probably write directly to
the main frame buffer or even one passed in as a parameter. This would
remove the need for binding the main buffer at the beginning and end of
the frame.
2022-03-24 12:56:29 +09:00
Bill Currie fb4fd979ec [gl] Move error check support into a better place
This makes it a little easier to spam checks everywhere and thus narrow
down the location of the error.
2022-03-15 12:33:25 +09:00
Bill Currie 48c225da89 [renderer] Merge the fog support code
GL still has its own functions for enabling and disabling fog while
rendering, but GLSL doesn't need such (thanks to the shaders), nor will
vulkan (and the software renderers don't support fog).
2022-03-08 02:28:19 +09:00
Bill Currie af0c66dff9 [renderer] Move frame rendering out a layer.
This is a step towards high-level unification of the renderers, as far
as possible keeping only actual low-level implementation details in the
individual renderers (some higher level stuff, eg shadows, is expected
to be per-renderer as some things are just not feasible to implement in
all renderers). However, the idea is to move the high-level
functionality into scene rendering.
2022-03-08 01:04:40 +09:00
Bill Currie 88ff254f42 Get QF cross-compiling using MXE/mingw32
This includes -win clients (no clue if anything actually works yet).
2021-03-27 20:09:37 +09:00
Bill Currie 8ee06d75a9 Separate render and presentation initialization
This paves the way for clean initialization of the Vulkan renderer, and
very much cleans up the older renderer initialization code as gl and sw
are no longer intertwined.
2019-07-09 01:00:47 +09:00