Don't mutate VAO binding when replaying glEnable/DisableVertexAttrib

* These calls need to go through DSA access like all the other VAO
  functions.
This commit is contained in:
baldurk committed 2017-05-02 22:58:12 +01:00
1 parent e4a5b80bdd
commit 6bcd293a3f
1 file changed
+14 -22
@@ -3663,20 +3663,16 @@ bool WrappedOpenGL::Serialise_glEnableVertexArrayAttribEXT(GLuint vaobj, GLuint
if(m_State < WRITING)
{
if(m_State == READING)
if(id != ResourceId())
{
if(id != ResourceId())
{
GLResource res = GetResourceManager()->GetLiveResource(id);
m_Real.glBindVertexArray(res.name);
}
else
{
m_Real.glBindVertexArray(m_FakeVAO);
}
vaobj = GetResourceManager()->GetLiveResource(id).name;
}
else
{
vaobj = m_FakeVAO;
}
m_Real.glEnableVertexAttribArray(Index);
m_Real.glEnableVertexArrayAttribEXT(vaobj, Index);
}
return true;
}
@@ -3745,20 +3741,16 @@ bool WrappedOpenGL::Serialise_glDisableVertexArrayAttribEXT(GLuint vaobj, GLuint
if(m_State < WRITING)
{
if(m_State == READING)
if(id != ResourceId())
{
if(id != ResourceId())
{
GLResource res = GetResourceManager()->GetLiveResource(id);
m_Real.glBindVertexArray(res.name);
}
else
{
m_Real.glBindVertexArray(m_FakeVAO);
}
vaobj = GetResourceManager()->GetLiveResource(id).name;
}
else
{
vaobj = m_FakeVAO;
}
m_Real.glDisableVertexAttribArray(Index);
m_Real.glDisableVertexArrayAttribEXT(vaobj, Index);
}
return true;
}