forked from organicmaps/organicmaps
this fixes "GPU Wait On Buffer" issue found in Xcode Instruments - OpenGL ES Analyzer.
This commit is contained in:
parent
e1bf439c7b
commit
8916569f7c
1 changed files with 7 additions and 0 deletions
|
@ -46,7 +46,14 @@ namespace yg
|
|||
m_size = size;
|
||||
makeCurrent();
|
||||
if (g_isBufferObjectsSupported)
|
||||
{
|
||||
OGLCHECK(glBufferDataFn(m_target, m_size, 0, GL_DYNAMIC_DRAW));
|
||||
/// In multithreaded resource usage scenarios the suggested way to see
|
||||
/// resource update made in one thread to the another thread is
|
||||
/// to call the glFlush in thread, which modifies resource and then rebind
|
||||
/// resource in another threads that is using this resource, if any.
|
||||
OGLCHECK(glFlush());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue