- change software renderer back to writing directly into the pixel buffer object, but change the creation and mapping so that hopefully all vendors put it in system memory
This commit is contained in:
parent
23c0f8f6ac
commit
a0a7fd53e8
3 changed files with 16 additions and 10 deletions
|
|
@ -111,17 +111,12 @@ sector_t *SWSceneDrawer::RenderView(player_t *player)
|
|||
fbtex->SystemTexture[0]->AllocateBuffer(screen->GetWidth(), screen->GetHeight(), V_IsTrueColor() ? 4 : 1);
|
||||
auto mat = FMaterial::ValidateTexture(fbtex.get(), false);
|
||||
mat->AddTextureLayer(PaletteTexture.get());
|
||||
|
||||
FBBuffer.Resize(screen->GetWidth() * screen->GetHeight());
|
||||
}
|
||||
|
||||
auto buf = (uint8_t*)&FBBuffer[0];
|
||||
auto buf = fbtex->SystemTexture[0]->MapBuffer();
|
||||
if (!buf) I_FatalError("Unable to map buffer for software rendering");
|
||||
buffer.SetBuffer(screen->GetWidth(), screen->GetHeight(), screen->GetWidth(), buf);
|
||||
SWRenderer->RenderView(player, &buffer);
|
||||
|
||||
auto pbobuf = fbtex->SystemTexture[0]->MapBuffer();
|
||||
if (!pbobuf) I_FatalError("Unable to map buffer for software rendering");
|
||||
memcpy(pbobuf, buf, FBBuffer.Size() * (V_IsTrueColor() ? 4 : 1));
|
||||
fbtex->SystemTexture[0]->CreateTexture(nullptr, screen->GetWidth(), screen->GetHeight(), 0, false, 0, "swbuffer");
|
||||
|
||||
auto map = swrenderer::CameraLight::Instance()->ShaderColormap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue