Christoph Oelckers
a33cc13054
- make GCC happy... :(
2018-10-31 17:20:04 +01:00
Christoph Oelckers
2dec7bb1e5
- added a non-multithreaded option for the renderer and fixed a few places where the wrong sector was used
...
The render_sector is only relevant for flats, but never for walls or sprites!
2018-10-31 17:13:22 +01:00
Christoph Oelckers
91df3f8c73
- added option to disable alpha testing for user shaders.
2018-10-31 15:56:20 +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
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
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
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
55df324d16
- basic multithreading for the render data generation.
2018-10-30 14:58:43 +01: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
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
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
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
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
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
Christoph Oelckers
cb4ffbf053
- moved the draw lists back to the API independent side.
...
The original idea was to let Vulkan do this completely differently, but if that comes to pass it should be done without having generic data maintenance code on the API side.
2018-10-28 19:06:29 +01:00
Christoph Oelckers
df15f00a21
- moved more code out of 'gl'.
2018-10-28 18:49:29 +01:00
Christoph Oelckers
926a918e0c
- moved the light buffer pointer to globally visible state.
2018-10-28 15:22:48 +01:00
Christoph Oelckers
54de0bf59f
- changed a bit more stuff that doesn't need to be routed through the OpenGL interface anymore.
2018-10-28 14:25:29 +01:00
Christoph Oelckers
f7c7c8d1c5
- moved some buffer variables out of GLRenderer into common parts of the code so that they can be accessed from hwrenderer as well.
...
This will allow more code to be moved out of the API dependent parts.
2018-10-28 13:56:24 +01:00
Christoph Oelckers
b51cc8b115
- base the viewpoint buffer on IDataBuffer.
2018-10-28 13:18:13 +01:00
Christoph Oelckers
3b26e64404
- renamed the 'vertexbuffer' files to 'buffers' because it's now generic for all buffer types.
2018-10-28 12:04:20 +01:00
Christoph Oelckers
9e109995cd
- moved model renderer to hwrenderer after removing the remaining traces of OpenGL.
2018-10-28 00:40:41 +02:00
Christoph Oelckers
a62cd64138
- removed all direct OpenGL dependencies from gl_models.cpp.
2018-10-27 22:55:33 +02:00
Christoph Oelckers
83e706afe7
- - removed the remains of the old FVertexBuffer class.
2018-10-27 22:04:13 +02:00
Christoph Oelckers
067716cefb
- made sky vertex buffer backend independent.
2018-10-27 21:31:27 +02:00
Christoph Oelckers
b92b7ca0a7
- fixed a few more places where unwanted dynamic lights were still active.
2018-10-27 19:25:51 +02:00
Christoph Oelckers
dad3c50ebd
- renamed classes before continuing.
2018-10-27 14:27:43 +02:00
Christoph Oelckers
332ab220ad
- hooked low level buffers into render state.
...
It still needs to support the old interface so the code isn't really clean
2018-10-27 10:55:35 +02:00
Christoph Oelckers
bb09f5488f
- added an abstract base vertex buffer class.
2018-10-27 09:07:26 +02:00
Christoph Oelckers
4f4bcd2d7d
- moved DrawSorted back to HWDrawList.
2018-10-25 22:45:55 +02:00
Christoph Oelckers
c98474d1c7
- portal refactoring complete.
2018-10-25 22:30:03 +02:00
Christoph Oelckers
cead0194bd
- safety commit. To finalize we need a better vertex buffer interface.
2018-10-25 00:49:39 +02:00