mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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() {
|
GLTextureTransferHelper::GLTextureTransferHelper() {
|
||||||
#ifdef THREADED_TEXTURE_TRANSFER
|
#ifdef THREADED_TEXTURE_TRANSFER
|
||||||
_canvas = std::make_shared<OffscreenGLCanvas>();
|
_canvas = QSharedPointer<OffscreenGLCanvas>(new OffscreenGLCanvas(), &QObject::deleteLater);
|
||||||
_canvas->create(QOpenGLContextWrapper::currentContext());
|
_canvas->create(QOpenGLContextWrapper::currentContext());
|
||||||
if (!_canvas->makeCurrent()) {
|
if (!_canvas->makeCurrent()) {
|
||||||
qFatal("Unable to create texture transfer context");
|
qFatal("Unable to create texture transfer context");
|
||||||
|
@ -89,9 +89,11 @@ void GLTextureTransferHelper::setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLTextureTransferHelper::shutdown() {
|
void GLTextureTransferHelper::shutdown() {
|
||||||
|
#ifdef THREADED_TEXTURE_TRANSFER
|
||||||
_canvas->doneCurrent();
|
_canvas->doneCurrent();
|
||||||
_canvas->moveToThreadWithContext(qApp->thread());
|
_canvas->moveToThreadWithContext(qApp->thread());
|
||||||
_canvas.reset();
|
_canvas.reset();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QSharedPointer>
|
||||||
#include <GenericQueueThread.h>
|
#include <GenericQueueThread.h>
|
||||||
#include "GLBackendShared.h"
|
#include "GLBackendShared.h"
|
||||||
|
|
||||||
|
@ -34,7 +35,7 @@ protected:
|
||||||
void transferTextureSynchronous(const gpu::Texture& texture);
|
void transferTextureSynchronous(const gpu::Texture& texture);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<OffscreenGLCanvas> _canvas;
|
QSharedPointer<OffscreenGLCanvas> _canvas;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
|
|
Loading…
Reference in a new issue