mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Exit cleanly in debug with GL logger
This commit is contained in:
parent
666bf8d42b
commit
c72a5f3605
2 changed files with 5 additions and 2 deletions
|
@ -36,7 +36,7 @@ using namespace gpu;
|
|||
|
||||
GLTextureTransferHelper::GLTextureTransferHelper() {
|
||||
#ifdef THREADED_TEXTURE_TRANSFER
|
||||
_canvas = std::make_shared<OffscreenGLCanvas>();
|
||||
_canvas = QSharedPointer<OffscreenGLCanvas>(new OffscreenGLCanvas(), &QObject::deleteLater);
|
||||
_canvas->create(QOpenGLContextWrapper::currentContext());
|
||||
if (!_canvas->makeCurrent()) {
|
||||
qFatal("Unable to create texture transfer context");
|
||||
|
@ -89,9 +89,11 @@ void GLTextureTransferHelper::setup() {
|
|||
}
|
||||
|
||||
void GLTextureTransferHelper::shutdown() {
|
||||
#ifdef THREADED_TEXTURE_TRANSFER
|
||||
_canvas->doneCurrent();
|
||||
_canvas->moveToThreadWithContext(qApp->thread());
|
||||
_canvas.reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <GenericQueueThread.h>
|
||||
#include "GLBackendShared.h"
|
||||
|
||||
|
@ -34,7 +35,7 @@ protected:
|
|||
void transferTextureSynchronous(const gpu::Texture& texture);
|
||||
|
||||
private:
|
||||
std::shared_ptr<OffscreenGLCanvas> _canvas;
|
||||
QSharedPointer<OffscreenGLCanvas> _canvas;
|
||||
};
|
||||
|
||||
template <typename F>
|
||||
|
|
Loading…
Reference in a new issue