- change the software renderer to render to a DSimpleCanvas like the old D3D9 target did. Then use the drawer threads to memcpy the result to the PBO
This commit is contained in:
parent
4d35b12808
commit
a841602d70
15 changed files with 70 additions and 28 deletions
|
|
@ -58,7 +58,7 @@ PolyRenderer::PolyRenderer()
|
|||
{
|
||||
}
|
||||
|
||||
void PolyRenderer::RenderView(player_t *player, DCanvas *target)
|
||||
void PolyRenderer::RenderView(player_t *player, DCanvas *target, void *videobuffer)
|
||||
{
|
||||
using namespace swrenderer;
|
||||
|
||||
|
|
@ -70,6 +70,11 @@ void PolyRenderer::RenderView(player_t *player, DCanvas *target)
|
|||
RenderActorView(player->mo, false);
|
||||
|
||||
Threads.MainThread()->FlushDrawQueue();
|
||||
|
||||
auto copyqueue = std::make_shared<DrawerCommandQueue>(Threads.MainThread()->FrameMemory.get());
|
||||
copyqueue->Push<MemcpyCommand>(videobuffer, target->GetPixels(), target->GetWidth(), target->GetHeight(), target->GetPitch(), target->IsBgra() ? 4 : 1);
|
||||
DrawerThreads::Execute(copyqueue);
|
||||
|
||||
PolyDrawerWaitCycles.Clock();
|
||||
DrawerThreads::WaitForWorkers();
|
||||
PolyDrawerWaitCycles.Unclock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue