mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue