Commit graph

15231 commits

Author SHA1 Message Date
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
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
e6efee61b1 - moved the last remaining function from gl_shadowmap.cpp elsewhere so that the file can be deleted. 2018-10-28 17:09:22 +01:00
Christoph Oelckers
54f46fdfee - moved most of FShadowMap to IShadowMap, except the main Update function. 2018-10-28 16:11:04 +01:00
Christoph Oelckers
cc058f98a5 - use IDataBuffer for the shadow map generator's buffers. 2018-10-28 15:59:20 +01:00
Christoph Oelckers
926a918e0c - moved the light buffer pointer to globally visible state. 2018-10-28 15:22:48 +01:00
Christoph Oelckers
b2776c9351 - moved lightbuffer files to hwrenderer. 2018-10-28 15:09:33 +01:00
Christoph Oelckers
bd7df13200 - let the light buffer use IDataBuffer as well. 2018-10-28 15:04:57 +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
c5b3b9e107 - moved the viewpoint buffer to hwrenderer. 2018-10-28 13:26:47 +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
a1fb1f60f4 - replaced IUniformBuffer with IDataBuffer, which reuses the code for the other buffer types and is more flexible. 2018-10-28 11:54:26 +01:00
Christoph Oelckers
8abf09afe2 - consolidated buffer implementations.
Since this is nearly identical for different buffer types they should share the same code wherever possible.
2018-10-28 09:45:51 +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
51acf3053c - fixed model vertex buffer setup.
Setting the buffer and its attribute bindings must be one step, not twp. With Vulkan this is a single API call.
This removes the now obsolete SetVertexBuffer method from the model renderer's interface.
2018-10-27 23:33:22 +02:00
Christoph Oelckers
a62cd64138 - removed all direct OpenGL dependencies from gl_models.cpp. 2018-10-27 22:55:33 +02:00
Christoph Oelckers
ac37ff422a - removed unneeded Apply call.
This had a problem with being called before some data was going to be deleted so its applied buffer state got lost.
2018-10-27 22:30:50 +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
537faa16dc - fixed: Before rendering a portal the dynamic light index must be reset.
Otherwise the portal may 'inherit' some light of the last rendered item.
This is important for non-scene portals which have no dynamic lighting.
2018-10-27 19:16:56 +02:00
Christoph Oelckers
cd8c7a17eb - model vertex buffer converted. 2018-10-27 16:59:13 +02:00
Christoph Oelckers
5201501534 - added lock/unlock methods to the buffer implementations.
These are not interchangeable with Map/Unmap!
Map/Unmap is for mapping a buffer for updating on old hardware, Lock/Unlock are for manually copying some initialization data directly into a static buffer.
2018-10-27 16:04:28 +02:00
Christoph Oelckers
5a4e5a8038 - moved the remaining parts of the main vertex buffer to hwrenderer. 2018-10-27 14:42:24 +02:00
Christoph Oelckers
dad3c50ebd - renamed classes before continuing. 2018-10-27 14:27:43 +02:00
Christoph Oelckers
72bc7693bd - refactored main vertex buffer (but didn't merge with hwrender class yet. 2018-10-27 14:24:47 +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
3db26a3a1b - added an abstract index buffer implementation as well. 2018-10-27 10:26:51 +02:00