diff --git a/yg/buffer_object.cpp b/yg/buffer_object.cpp index 3a14709822..be9143fd52 100644 --- a/yg/buffer_object.cpp +++ b/yg/buffer_object.cpp @@ -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()); + } } }