mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 23:32:02 +00:00
- fixed: If we want to cache texture binding state we have to reset it in all places where a texture becomes unbound.
This commit is contained in:
parent
12160bd29c
commit
a280c20b4e
4 changed files with 8 additions and 0 deletions
|
@ -240,6 +240,7 @@ void OpenGLFrameBuffer::WipeCleanup()
|
||||||
delete wipeendscreen;
|
delete wipeendscreen;
|
||||||
wipeendscreen = NULL;
|
wipeendscreen = NULL;
|
||||||
}
|
}
|
||||||
|
FMaterial::ClearLastTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -403,6 +403,7 @@ void FHardwareTexture::UnbindAll()
|
||||||
{
|
{
|
||||||
Unbind(texunit);
|
Unbind(texunit);
|
||||||
}
|
}
|
||||||
|
FMaterial::ClearLastTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -753,6 +753,7 @@ void FMaterial::BindToFrameBuffer()
|
||||||
// must create the hardware texture first
|
// must create the hardware texture first
|
||||||
mBaseLayer->Bind(0, 0, 0, false, NULL);
|
mBaseLayer->Bind(0, 0, 0, false, NULL);
|
||||||
FHardwareTexture::Unbind(0);
|
FHardwareTexture::Unbind(0);
|
||||||
|
ClearLastTexture();
|
||||||
}
|
}
|
||||||
mBaseLayer->mHwTexture->BindToFrameBuffer();
|
mBaseLayer->mHwTexture->BindToFrameBuffer();
|
||||||
}
|
}
|
||||||
|
@ -809,3 +810,7 @@ void FMaterial::FlushAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FMaterial::ClearLastTexture()
|
||||||
|
{
|
||||||
|
last = NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -253,6 +253,7 @@ public:
|
||||||
static void FlushAll();
|
static void FlushAll();
|
||||||
static FMaterial *ValidateTexture(FTexture * tex, bool expand);
|
static FMaterial *ValidateTexture(FTexture * tex, bool expand);
|
||||||
static FMaterial *ValidateTexture(FTextureID no, bool expand, bool trans);
|
static FMaterial *ValidateTexture(FTextureID no, bool expand, bool trans);
|
||||||
|
static void ClearLastTexture();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue