ensure texture is not copied in one thread while it's read in another
This seems to cause issues in the rendering pipeline, so this commit never lets a texture copy and read occur at the same time.
This commit is contained in:
@@ -156,6 +156,16 @@ void OpenGLTexture::Upload(const void *data)
|
||||
Release();
|
||||
}
|
||||
|
||||
void OpenGLTexture::Lock()
|
||||
{
|
||||
mutex_.lock();
|
||||
}
|
||||
|
||||
void OpenGLTexture::Unlock()
|
||||
{
|
||||
mutex_.unlock();
|
||||
}
|
||||
|
||||
void OpenGLTexture::CreateInternal(QOpenGLContext* create_ctx, GLuint* tex, const void *data)
|
||||
{
|
||||
QOpenGLFunctions* f = create_ctx->functions();
|
||||
|
||||
Reference in New Issue
Block a user