Commit graph

135 commits

Author SHA1 Message Date
Christoph Oelckers
6f39b87d5b - actually draw the fullscreen blends. 2020-01-19 23:49:53 +01:00
Christoph Oelckers
b066f725d4 - clear the matrix list after rendering the 2D content. 2020-01-19 23:27:59 +01:00
Christoph Oelckers
aa1361acbb - make palfadedelta explicitly unsigned 2020-01-19 23:18:38 +01:00
Christoph Oelckers
c8fa2443d3 - completely separated view and model matrix.
This way the view matrix will remain constant per scene and an update of the model matrix is only needed for rendering a model or voxel, reducing the total amount of generated matrices to the point where they can be written to a buffer instead of constantly uploading them as uniforms.
2020-01-19 16:07:09 +01:00
Christoph Oelckers
b209b1f960 - make sure that the first matrix is always the identity matrix. It was just random luck that it was always put there before.
- let the matrix setters return the previous value for easy restoring without creating yet another matrix.
2020-01-19 14:08:48 +01:00
Christoph Oelckers
352c099b5a - basics for hardware rendered camera textures. 2020-01-19 08:40:03 +01:00
Christoph Oelckers
454f796b69 - collect all 3D geometry in a list so that it can be rendered later.
With this out of the way the renderer can now be switched to the core profile.
2020-01-18 22:41:08 +01:00
Christoph Oelckers
2bc1708870 - removed the complete crosshair color hackery.
The code needs to be refactored anyway to allow better crosshair control but this also seemed to affect global render state, considering how poorly it was all implemented.
2020-01-18 16:14:31 +01:00
Christoph Oelckers
8cd9775513 - fixed VP8 video player.
Also do the color space conversion on the CPU to avoid the shader hassle, performance wise it is utterly irrelevant here.
2020-01-18 16:14:30 +01:00
Christoph Oelckers
2e06ccfec6 - draw the screen overlays using the vertex buffer. 2020-01-18 16:14:30 +01:00
Christoph Oelckers
4aacd6d958 - display the savepics.
- fixed level name list in Exhumed.
2020-01-14 22:37:23 +01:00
Christoph Oelckers
55dab6d3d3 - hooked up the high color texture colorization code.
Not tested and probably still not working correctly, the entire feature was a nearly impenetrable mess of convoluted code. This definitely needs verification with multiple mods using it.
2020-01-11 22:18:06 +01:00
Christoph Oelckers
fb985d2503 - more macOS compilation fixes
Still not complete…
2020-01-07 01:11:19 +01:00
Christoph Oelckers
134122335b - first attempt to compile on a Mac
This could have gone better, there's far too many warnings here
2020-01-06 02:41:47 +01:00
Christoph Oelckers
2dc0de5824 - fixed incorrect sampler binding. 2020-01-05 17:37:28 +01:00
Christoph Oelckers
9e7f91b5ac - fixed size of texture arrays.
We need 6 slots, not 5.
2020-01-05 12:56:32 +01:00
Christoph Oelckers
6c6874cb0e - fixed scissoring with out of range coordinates.
Blood's status bar sets such a bogus clipping rectangle.
2020-01-05 10:21:34 +01:00
Christoph Oelckers
e84acb7e2f - invalidate the render state after finishing a frame.
Last bound textures in particular may not be valid anymore in the next frame in movie playback.
2020-01-05 09:38:44 +01:00
Christoph Oelckers
e61e77fb82 - handle textures in the render state.
This should complete the transition and allow storing the render state in an array so that Polymost can be rewritten to create draw lists instead of actually doing the rendering itself.
2020-01-04 23:58:26 +01:00
Magnus Norddahl
0714155e3a Fix ssao no longer working 2020-01-04 09:54:47 +01:00
Christoph Oelckers
d4b32c535a - moved matrices to render state. 2020-01-03 23:38:50 +01:00
Magnus Norddahl
13a7b7d4b2 Hook up gl_ssao 2020-01-03 18:34:43 +01:00
Christoph Oelckers
6ba04e7a09 - fixed voxel rendering in indexed color mode. 2020-01-03 18:30:00 +01:00
Christoph Oelckers
f743b22661 - render voxels as triangles instead of quads.
Quads are not available in the core profile which is required to run GL 3.3 on macOS.
2020-01-03 18:09:05 +01:00
Christoph Oelckers
ce75832945 - color and depth func moved to render state. 2020-01-03 11:43:44 +01:00
Christoph Oelckers
27ed6cdae5 - viewport and scissor moved to render state. 2020-01-03 10:48:22 +01:00
Christoph Oelckers
cfc0ba48cb - moved render style handling to the render state and simplified its storage to use FRenderStyle instead of its components. 2020-01-03 10:48:22 +01:00
Christoph Oelckers
3380420de9 - converted the clear screen commands. 2020-01-02 23:56:35 +01:00
Christoph Oelckers
3608a646e6 - converted the simple state settings into renderstate flags. 2020-01-02 23:34:21 +01:00
Christoph Oelckers
6156e7382a - preparation for moving GL state into the renderstate struct. 2020-01-02 23:15:16 +01:00
Christoph Oelckers
afb1d7b885 - changed a few licenses of my own code to something more permissive. 2020-01-02 19:38:47 +01:00
Christoph Oelckers
7ec8368688 - used the wrong formula to calculate shadeDiv. 2020-01-01 11:49:32 +01:00
Christoph Oelckers
3d47652d08 - had a look at Exhumed's shade tables and implemented the necessary adjustments for the 3 with abnormal gradients. 2019-12-31 22:53:03 +01:00
Christoph Oelckers
1890df98f9 - process lines through the 2D drawer. 2019-12-31 19:02:55 +01:00
Christoph Oelckers
964e303dd7 - draw the textures on the automap with the 2D drawer. 2019-12-31 15:05:08 +01:00
Christoph Oelckers
6b431cec2c - fixed: True color texture replacements were set up incorrectly.
They incorrectly set themselves up as their own glow and detail textures.
These layers also weren't disabled for the next texture.
2019-12-30 20:44:37 +01:00
Christoph Oelckers
ad24a1ce31 - place weapon sprites in a separate render list.
They need to be drawn in a different pass than the 2D overlay HUD so the backend must have them separately.
2019-12-30 20:16:51 +01:00
Christoph Oelckers
5830e72ab0 - fixed some rotatesprite issues:
* scissor was not applied
* texture coordinates were fetched from the wrong texture, courtesy of using global variables.
2019-12-30 19:37:23 +01:00
Christoph Oelckers
6459f4e532 - refactored rotatesprite to really use the 2D drawer.
Mostly working, except clipping and weapon sprites.
2019-12-30 19:37:23 +01:00
Christoph Oelckers
737bf15ad8 - added GZDoom's postprocessing/presentation code.
Compiles but only draws a black screen. Something must be missing but no idea yet what that might be.
2019-12-28 22:36:47 +01:00
Christoph Oelckers
a021b96119 - added the needed parts of GZDoom's render backend to have the postprocessor working.
Not hooked up yet.
2019-12-28 18:20:47 +01:00
Christoph Oelckers
68a3a60d0b - Exhumed menu tweaks - draw a background and caption for the option menus the game originally did not have.
- fixed a crash in the 2D drawer when two consecutively allocated vertex buffers had the same address. Strangely this only occured with Exhumed but not the other games
- fixed Exhumed crashing with sound disabled.
2019-12-26 17:42:45 +01:00
Christoph Oelckers
62e9112133 - renamed the internal resource directory to "engine" and routed most literal mentions of the engine name through version.h
All this comes from a time when I didn't use version.h so it's better to do it the same way as GZDoom to allow easy renaming of the engine.
2019-12-26 14:04:53 +01:00
Christoph Oelckers
120a985b98 - disable palette transparency for color 255 when running an animation.
There's several intro cutscenes using the full palette and for these the color must not be nulled as it should for in-game textures.
2019-12-25 14:13:15 +01:00
Christoph Oelckers
3b98635170 - removed all remaining references to SDL. The Windows version is now fully native. 2019-12-23 20:03:03 +01:00
Christoph Oelckers
62ecedf1f8 - got it to the point where it can render to the GL surface from the native backend. 2019-12-23 19:37:40 +01:00
Christoph Oelckers
a1f7f0cc30 - added the GL framebuffer class.
Everything compiles again but obviously no init code will run for now.
2019-12-23 15:40:17 +01:00
Christoph Oelckers
30cbcb54b1 - renamed the remaining file system access wrappers in cache1d.h 2019-12-07 10:31:27 +01:00
Christoph Oelckers
749eda32c5 - moved kopenfilereader into the FileSystem class. 2019-12-07 10:14:51 +01:00
Christoph Oelckers
1cfe5be130 - fixed creation of true color textures.
The palette check was not correct so they ended up empty and caused other problems down the line.
2019-12-01 21:43:54 +01:00