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:
baldurk
2015-11-03 22:54:43 +01:00
parent ad805e8117
commit 28f0e7a484
+4
View File
@@ -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()