mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 20:49:08 +02:00
Move the texture transfer context back to the main thread for shutdown
This commit is contained in:
parent
e76a04951c
commit
e194fc39f4
2 changed files with 7 additions and 0 deletions
|
@ -77,6 +77,12 @@ void GLTextureTransferHelper::setup() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void GLTextureTransferHelper::shutdown() {
|
||||
_canvas->doneCurrent();
|
||||
_canvas->moveToThreadWithContext(qApp->thread());
|
||||
}
|
||||
|
||||
|
||||
bool GLTextureTransferHelper::processQueueItems(const Queue& messages) {
|
||||
for (auto package : messages) {
|
||||
glWaitSync(package.fence, 0, GL_TIMEOUT_IGNORED);
|
||||
|
|
|
@ -28,6 +28,7 @@ public:
|
|||
|
||||
protected:
|
||||
void setup() override;
|
||||
void shutdown() override;
|
||||
bool processQueueItems(const Queue& messages) override;
|
||||
void transferTextureSynchronous(const gpu::Texture& texture);
|
||||
|
||||
|
|
Loading…
Reference in a new issue