Commit graph

15759 commits

Author SHA1 Message Date
Christoph Oelckers
91df3f8c73 - added option to disable alpha testing for user shaders. 2018-10-31 15:56:20 +01:00
Christoph Oelckers
40da1dbfbc - removed bad 'return' in C_MidPrint definition. 2018-10-31 13:13:32 +01:00
Christoph Oelckers
37166b5faf - fixed missing binding of the light buffer.
I thought this wasn't needed but apparently the buffer refactoring caused this not to be done automatically anymore.
Best have it once at the start of each frame where the cost is negligible.
2018-10-31 12:48:09 +01:00
Christoph Oelckers
41fd34e424 - use standard sprite lighting for voxels.
Per-pixel lighting requires normals which voxels do not have.
2018-10-31 12:28:10 +01:00
Christoph Oelckers
3a6f186aa0 - removed memcpy workarounds from GLWall, GLFlat and GLSprite after making sure that all 3 are trivially copyable. 2018-10-31 11:51:52 +01:00
Christoph Oelckers
fdf324cce5 - fixed error message for old OpenGL versions. There was still a mention of "with framebuffer support" which is core in 3.3. 2018-10-31 10:50:45 +01:00
Christoph Oelckers
533ded8d1e Merge branch 'master' into mt 2018-10-31 10:20:29 +01:00
Christoph Oelckers
790b121195 - added a bit of profiling code to the multithreaded parts of the renderer. 2018-10-31 10:20:06 +01:00
Christoph Oelckers
01a0af8ad1 - simplified the render job interface.
Since the job nodes were already taken from a static array, the added linked list isn't really needed. All we need is a read and a write pointer into the array, This can even be done without a spinlock as long as we assume that the list never overflows.
2018-10-31 09:49:07 +01:00
Christoph Oelckers
e9c2247ff4 - added missing file. 2018-10-31 09:22:38 +01:00
Christoph Oelckers
e4d2ec8cb2 - added a few comments to the renderstate to document where certain functions are used. 2018-10-31 08:16:44 +01:00
Christoph Oelckers
aafa445aac - fixed stencil marking for SSAO. 2018-10-30 23:33:45 +01:00
Christoph Oelckers
e2e34f5245 - cleanup of the buffer binding interface.
Some stuff is not really needed and the vertex buffers no longer need to insert themselves into the render state.
2018-10-30 22:43:58 +01:00
Christoph Oelckers
1be1470d47 - cleanup of hw_bsp.cpp. 2018-10-30 22:19:55 +01:00
Marrub
0b460ccb03 Squashed commit of the following:
commit 767e3a64f0d5fd27ef56de6e93221e9b2016a0c7
Author: Marrub <marrub.xz@gmail.com>
Date:   Tue Oct 30 04:01:09 2018 -0400

    ProMessage -> PronounMessage

commit 305477f63fb669f8cf2d9f6d609ed3988f437664
Author: Marrub <marrub.xz@gmail.com>
Date:   Mon Oct 29 23:56:58 2018 -0400

    improve variable naming

commit f3f0245d0cdcc1b0a8a9b74806bc8954be747f40
Author: Marrub <marrub.xz@gmail.com>
Date:   Mon Oct 29 19:52:32 2018 -0400

    add "neutral" gender option and better obit formatting
2018-10-30 21:42:09 +01:00
Christoph Oelckers
48bc5550d7 - removed the Bind function from FFlatVertexBuffer.
This is not flexible enough. There was already one place where this was not supposed to go through the render state.
The new interface allows more general use of the contained buffer objects.
2018-10-30 19:28:47 +01:00
Christoph Oelckers
fa498611f8 - uncoupled texture precaching from regular binding for rendering.
The precaching should not depend on code that may be subject to change.
2018-10-30 19:27:10 +01:00
Christoph Oelckers
55df324d16 - basic multithreading for the render data generation. 2018-10-30 14:58:43 +01:00
Rachael Alexanderson
94688a3700 - do a texture check when drawing fog borders in the software renderer. this does not fix the crash issue, but mitigates it enough with a check that likely should be in place, anyhow. 2018-10-30 01:13:00 -04:00
alexey.lysiuk
0c686e6f92 - more fixes for GCC
error: ‘size_t’ does not name a type
error: ‘assert’ was not declared in this scope
2018-10-29 22:57:45 +02:00
Christoph Oelckers
b56e80a556 - disabled the buffer reallocation option for the light buffer.
The entire idea with CPU side buffering simply can not work since the buffer is being used live. To compensate the buffer's size was doubled.
2018-10-29 21:53:43 +01:00
alexey.lysiuk
2e02b7e555 - fixed compilation of SDL backend
error: unknown type name 'OpenGLFrameBuffer'
2018-10-29 22:41:24 +02:00
alexey.lysiuk
d2c7ffb2ca - fixed crash with Cocoa backend on startup 2018-10-29 22:33:27 +02:00
alexey.lysiuk
2aac222d35 - fixed compilation on macOS
error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list
error: unknown type name 'OpenGLFrameBuffer'
2018-10-29 22:32:36 +02:00
Christoph Oelckers
0200ee7c13 Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-10-29 18:42:12 +01:00
Christoph Oelckers
47ae42d636 - fixed: for sectors that have to be drawn per subsector the render state was not applied. resulting in random garbage. 2018-10-29 17:52:44 +01:00
Rachael Alexanderson
c808af94ca - change 'other' gender to 'robotic' for English 2018-10-29 09:54:11 -04:00
Christoph Oelckers
f7446160bb Merge branch 'master' into renderstate_abstraction 2018-10-29 14:00:43 +01:00
Christoph Oelckers
118bc78fe3 - moved the entire OpenGL backend into a separate namespace. 2018-10-29 13:56:17 +01:00
Christoph Oelckers
0c8b36e121 - moved the texture resizer to hwrenderer.
This is pure math and will be shareable with Vulkan.
2018-10-29 13:18:48 +01:00
Christoph Oelckers
190a225301 - minor cleanup. 2018-10-29 13:00:12 +01:00
Christoph Oelckers
893e08df70 - moved DrawScene to GLRenderer and call it through std::function.
This was the last remaining virtual override of HWDrawInfo.
With it removed this type is now fully API independent.
2018-10-29 12:54:10 +01:00
Christoph Oelckers
325d2126ec - moved ProcessScene to hwrenderer 2018-10-29 12:25:41 +01:00
Christoph Oelckers
8991537e57 - moved the 2D drawer tp hwrenderer. 2018-10-29 12:14:36 +01:00
Christoph Oelckers
8a0596893b - fixed dynamic light profiling counters.
The draw counters were never incremented and this should be reset only once per scene, not once per viewpoint.
2018-10-29 10:36:48 +01:00
Christoph Oelckers
361bb688c8 - moved Set3DViewport to hwrenderer. 2018-10-29 10:21:52 +01:00
Christoph Oelckers
362ecacd52 - moved the End*Scene functions to hwrenderer. 2018-10-29 09:58:37 +01:00
Christoph Oelckers
1bbc9f6730 - removed two of the state flags in SetStencil and handle them explicitly. 2018-10-29 09:53:07 +01:00
Christoph Oelckers
163d6be0d7 - added a few more GL state wrappers to the render state.
Not used yet.
2018-10-29 09:41:26 +01:00
Christoph Oelckers
f6d9592a45 - moved calls to renderstate from buffer implementation into a subfunction so that it's easier to change if needed. 2018-10-29 09:40:03 +01:00
Christoph Oelckers
90982285ac - moved the mSceneClearColor variable to main DFrameBuffer class. 2018-10-29 09:34:30 +01:00
Christoph Oelckers
98e111eba0 - merged the nearly identical wrapper texture classes for the software render and the wiper. 2018-10-29 07:39:33 +01:00
Christoph Oelckers
6dc47ff328 - the last commit was incomplete. 2018-10-29 07:06:29 +01:00
Christoph Oelckers
5528981a77 - CreateScene, too. 2018-10-28 23:32:13 +01:00
Christoph Oelckers
70f9507f16 - moved RenderPortal, too. 2018-10-28 23:18:19 +01:00
Christoph Oelckers
24d6b23042 - moved RenderScene and RenderTranslucent to hwrenderer. 2018-10-28 22:58:35 +01:00
Christoph Oelckers
9b56f407dd - moved all 'present' functions into FGLRenderer.
This list of functions contained half of the existing references to the global GLRenderer variable.
2018-10-28 22:36:52 +01:00
Christoph Oelckers
9f9d747a6b - moved all methods that would involve command buffer manipulation in Vulkan to FRenderState, because that's the object that would serve as command buffer builder. 2018-10-28 22:20:51 +01:00
Christoph Oelckers
2ee2766812 - moved more code from FDrawInfo to HWDrawInfo.
The entire setup/takedown code did not reference any API specific data. The only thing needed is a global virtual creation function.
2018-10-28 19:39:31 +01:00
Christoph Oelckers
1ca811d4a8 - moved more code out of FDrawInfo. 2018-10-28 19:19:46 +01:00