- invalidate the render state after finishing a frame.

Last bound textures in particular may not be valid anymore in the next frame in movie playback.
This commit is contained in:
Christoph Oelckers 2020-01-05 09:38:44 +01:00
parent e61e77fb82
commit e84acb7e2f
3 changed files with 10 additions and 0 deletions

View file

@ -465,5 +465,6 @@ void videoShowFrame(int32_t w)
}
twodpsp.Clear();
twodgen.Clear();
GLInterface.ResetFrame();
}

View file

@ -204,6 +204,14 @@ FHardwareTexture* GLInstance::NewTexture()
return new FHardwareTexture;
}
void GLInstance::ResetFrame()
{
GLState s;
lastState = s; // Back to defaults.
lastState.Style.BlendOp = -1; // invalidate. This forces a reset for the next operation
}
std::pair<size_t, BaseVertex *> GLInstance::AllocVertices(size_t num)
{

View file

@ -215,6 +215,7 @@ public:
void LoadVPXShader();
void Draw2D(F2DDrawer* drawer);
void DrawImGui(ImDrawData*);
void ResetFrame();
void Deinit();