mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 18:51:17 -06:00
Upload "fix" for globebrowsing stuttering
This commit is contained in:
@@ -316,6 +316,15 @@ void Scene::render(const RenderData& data, RendererTasks& tasks) {
|
||||
if (global::callback::webBrowserPerformanceHotfix) {
|
||||
(*global::callback::webBrowserPerformanceHotfix)();
|
||||
}
|
||||
|
||||
// @TODO(abock 2019-08-19) This glGetError call is a hack to prevent the GPU
|
||||
// thread and the CPU thread from diverging too much, particularly the uploading
|
||||
// of a lot of textures for the globebrowsing planets can cause a hard stuttering
|
||||
// effect. Asking for a glGetError after every rendering call will force the
|
||||
// threads to implicitly synchronize and thus prevent the stuttering. The better
|
||||
// solution would be to reduce the number of uploads per frame, use a staggered
|
||||
// buffer, or something else like that preventing a large spike in uploads
|
||||
glGetError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user