Merge pull request #948 from comex/vao-fix

Don't switch to a vertex array object of 0.
This commit is contained in:
comex 2014-09-05 11:46:28 -04:00
commit e7f03dd066
1 changed files with 2 additions and 1 deletions

View File

@ -1734,7 +1734,8 @@ void Renderer::RestoreAPIState()
VertexManager *vm = (OGL::VertexManager*)g_vertex_manager;
glBindBuffer(GL_ARRAY_BUFFER, vm->m_vertex_buffers);
glBindVertexArray(vm->m_last_vao);
if (vm->m_last_vao)
glBindVertexArray(vm->m_last_vao);
TextureCache::SetStage();
}