mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 17:14:52 +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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GLTextureTransferHelper::shutdown() {
|
||||||
|
_canvas->doneCurrent();
|
||||||
|
_canvas->moveToThreadWithContext(qApp->thread());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool GLTextureTransferHelper::processQueueItems(const Queue& messages) {
|
bool GLTextureTransferHelper::processQueueItems(const Queue& messages) {
|
||||||
for (auto package : messages) {
|
for (auto package : messages) {
|
||||||
glWaitSync(package.fence, 0, GL_TIMEOUT_IGNORED);
|
glWaitSync(package.fence, 0, GL_TIMEOUT_IGNORED);
|
||||||
|
|
|
@ -28,6 +28,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setup() override;
|
void setup() override;
|
||||||
|
void shutdown() override;
|
||||||
bool processQueueItems(const Queue& messages) override;
|
bool processQueueItems(const Queue& messages) override;
|
||||||
void transferTextureSynchronous(const gpu::Texture& texture);
|
void transferTextureSynchronous(const gpu::Texture& texture);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue