mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- 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:
parent
e61e77fb82
commit
e84acb7e2f
3 changed files with 10 additions and 0 deletions
|
@ -465,5 +465,6 @@ void videoShowFrame(int32_t w)
|
|||
}
|
||||
twodpsp.Clear();
|
||||
twodgen.Clear();
|
||||
GLInterface.ResetFrame();
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -215,6 +215,7 @@ public:
|
|||
void LoadVPXShader();
|
||||
void Draw2D(F2DDrawer* drawer);
|
||||
void DrawImGui(ImDrawData*);
|
||||
void ResetFrame();
|
||||
|
||||
void Deinit();
|
||||
|
||||
|
|
Loading…
Reference in a new issue