OGL: Track state of last bound vertex array object

This reduces the overhead of calling glBindVertexArray() every time
RestoreAPIState() is called, even when it is redundant.
This commit is contained in:
Stenzek
2018-01-21 00:59:10 +10:00
parent fca9c28f38
commit 3fd4142f36
9 changed files with 59 additions and 29 deletions

View File

@ -1493,10 +1493,6 @@ void Renderer::RestoreAPIState()
BPFunctions::SetViewport();
BPFunctions::SetDepthMode();
BPFunctions::SetBlendMode();
ProgramShaderCache::BindLastVertexFormat();
const VertexManager* const vm = static_cast<VertexManager*>(g_vertex_manager.get());
glBindBuffer(GL_ARRAY_BUFFER, vm->GetVertexBufferHandle());
}
void Renderer::SetRasterizationState(const RasterizationState& state)