mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- fully synchronized the backend code with GZDoom.
The camera texture code couldn't be done earlier.
This commit is contained in:
parent
5effc95ae1
commit
d4b32bf79f
3 changed files with 6 additions and 11 deletions
|
@ -265,7 +265,6 @@ void OpenGLFrameBuffer::Swap()
|
|||
FHardwareTexture::UnbindAll();
|
||||
gl_RenderState.ClearLastMaterial();
|
||||
mDebug->Update();
|
||||
mVertexData->Reset();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -160,16 +160,11 @@ void FGLRenderer::EndOffscreen()
|
|||
|
||||
void FGLRenderer::BindToFrameBuffer(FTexture *tex)
|
||||
{
|
||||
auto pBaseLayer = tex->SystemTextures.GetHardwareTexture(0, false);
|
||||
auto BaseLayer = pBaseLayer ? (OpenGLRenderer::FHardwareTexture*)pBaseLayer : nullptr;
|
||||
|
||||
if (BaseLayer == nullptr)
|
||||
{
|
||||
// must create the hardware texture first
|
||||
BaseLayer = new FHardwareTexture(4);
|
||||
BaseLayer->CreateTexture(nullptr, tex->GetWidth(), tex->GetHeight(), 15, false, "Camtex");
|
||||
tex->SystemTextures.AddHardwareTexture(0, false, BaseLayer);
|
||||
}
|
||||
auto BaseLayer = static_cast<FHardwareTexture*>(tex->GetHardwareTexture(0, 0));
|
||||
// must create the hardware texture first
|
||||
BaseLayer->BindOrCreate(tex, 0, 0, 0, 0);
|
||||
FHardwareTexture::Unbind(0);
|
||||
gl_RenderState.ClearLastMaterial();
|
||||
BaseLayer->BindToFrameBuffer(tex->GetWidth(), tex->GetHeight());
|
||||
}
|
||||
|
||||
|
|
|
@ -453,6 +453,7 @@ void videoShowFrame(int32_t w)
|
|||
Draw2D(&twodpsp, *screen->RenderState()); // draws the weapon sprites
|
||||
});
|
||||
screen->Update();
|
||||
screen->mVertexData->Reset();
|
||||
// After finishing the frame, reset everything for the next frame. This needs to be done better.
|
||||
screen->BeginFrame();
|
||||
bool useSSAO = (gl_ssao != 0);
|
||||
|
|
Loading…
Reference in a new issue