Fixes an issue where rendering without Vertex Array Objects would cause a massive slowdown in the driver on Nvidia hardware. Unconfirmed if the issue is present on other GPUs.

This commit is contained in:
Henry Dooley
2016-03-04 10:23:09 -08:00
parent d10d3eef43
commit cf4dddd1b9

View File

@@ -233,9 +233,6 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame)
transformState = state;
// Cleanup OpenGL objects that we abandoned since the last render call.
glObjectStore.performCleanup();
if (!painter) painter = std::make_unique<Painter>(data, transformState, glObjectStore);
painter->render(*style, frame, data.getAnnotationManager()->getSpriteAtlas());
@@ -244,6 +241,9 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame)
callback = nullptr;
}
// Cleanup OpenGL objects that we abandoned since the last render call.
glObjectStore.performCleanup();
view.afterRender();
if (style->hasTransitions()) {