- added the main vertex buffer and some code to maintain it on systems where persistent mapping is not possible.

All games combined there's 11(!!!) scene render blocks, not counting the sub-blocks for ROR and mirrors.
Does it surprise anyone that most of these sub-blocks do not feature all engine capabilities?
This commit is contained in:
Christoph Oelckers 2020-01-12 20:28:07 +01:00
parent 661431df87
commit 95f917a408
17 changed files with 299 additions and 68 deletions

View file

@ -49,8 +49,8 @@
/*
#include "hwrenderer/scene/hw_portal.h"
#include "hwrenderer/utility/hw_clock.h"
#include "hwrenderer/data/flatvertices.h"
*/
#include "hwrenderer/data/flatvertices.h"
#include <chrono>
#include <thread>
@ -189,7 +189,7 @@ void DFrameBuffer::Update()
{
SetVirtualSize(clientWidth, clientHeight);
V_OutputResized(clientWidth, clientHeight);
//mVertexData->OutputResized(clientWidth, clientHeight);
mVertexData->OutputResized(clientWidth, clientHeight);
}
}
@ -364,3 +364,21 @@ void DFrameBuffer::FPSLimit()
}
#endif
}
void DFrameBuffer::BeginScene()
{
if (videoGetRenderMode() < REND_POLYMOST) return;
assert(BufferLock >= 0);
if (BufferLock++ == 0)
{
mVertexData->Map();
}
}
void DFrameBuffer::FinishScene()
{
if (videoGetRenderMode() < REND_POLYMOST) return;
assert(BufferLock > 0);
if (--BufferLock == 0)
mVertexData->Unmap();
}