mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 22:46:41 +00:00
Clear GL errors after Fetch/Apply state
* This can happen if e.g. some state we're fetching or restoring is not supported on the current GL context.
This commit is contained in:
@@ -792,6 +792,8 @@ void GLRenderState::FetchState(void *ctx, WrappedOpenGL *gl)
|
||||
m_Real->glGetIntegerv(eGL_CULL_FACE_MODE, (GLint *)&CullFace);
|
||||
|
||||
Unpack.Fetch(m_Real, true);
|
||||
|
||||
ClearGLErrors(*m_Real);
|
||||
}
|
||||
|
||||
void GLRenderState::ApplyState(void *ctx, WrappedOpenGL *gl)
|
||||
@@ -1083,6 +1085,8 @@ void GLRenderState::ApplyState(void *ctx, WrappedOpenGL *gl)
|
||||
m_Real->glCullFace(CullFace);
|
||||
|
||||
Unpack.Apply(m_Real, true);
|
||||
|
||||
ClearGLErrors(*m_Real);
|
||||
}
|
||||
|
||||
void GLRenderState::Clear()
|
||||
|
||||
Reference in New Issue
Block a user