Draw 8-bit software renderer with polybackend (well, sort of!)
This commit is contained in:
parent
4a2b763aaa
commit
44c2223c2f
6 changed files with 10 additions and 15 deletions
|
|
@ -136,9 +136,12 @@ namespace swrenderer
|
|||
|
||||
RenderActorView(player->mo, true, false);
|
||||
|
||||
auto copyqueue = std::make_shared<DrawerCommandQueue>(MainThread()->FrameMemory.get());
|
||||
copyqueue->Push<MemcpyCommand>(videobuffer, bufferpitch, target->GetPixels(), target->GetWidth(), target->GetHeight(), target->GetPitch(), target->IsBgra() ? 4 : 1);
|
||||
DrawerThreads::Execute(copyqueue);
|
||||
if (videobuffer != target->GetPixels())
|
||||
{
|
||||
auto copyqueue = std::make_shared<DrawerCommandQueue>(MainThread()->FrameMemory.get());
|
||||
copyqueue->Push<MemcpyCommand>(videobuffer, bufferpitch, target->GetPixels(), target->GetWidth(), target->GetHeight(), target->GetPitch(), target->IsBgra() ? 4 : 1);
|
||||
DrawerThreads::Execute(copyqueue);
|
||||
}
|
||||
|
||||
DrawerWaitCycles.Clock();
|
||||
DrawerThreads::WaitForWorkers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue