mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
Give names to offscreen contexts for easier debugging
This commit is contained in:
parent
0213dd0359
commit
587d015c57
3 changed files with 4 additions and 0 deletions
|
@ -1483,6 +1483,7 @@ void Application::initializeGL() {
|
|||
|
||||
_glWidget->makeCurrent();
|
||||
_chromiumShareContext = new OffscreenGLCanvas();
|
||||
_chromiumShareContext->setObjectName("ChromiumShareContext");
|
||||
_chromiumShareContext->create(_glWidget->context()->contextHandle());
|
||||
_chromiumShareContext->makeCurrent();
|
||||
qt_gl_set_global_share_context(_chromiumShareContext->getContext());
|
||||
|
@ -1529,6 +1530,7 @@ void Application::initializeGL() {
|
|||
_idleLoopStdev.reset();
|
||||
|
||||
_offscreenContext = new OffscreenGLCanvas();
|
||||
_offscreenContext->setObjectName("MainThreadContext");
|
||||
_offscreenContext->create(_glWidget->context()->contextHandle());
|
||||
_offscreenContext->makeCurrent();
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@ QEvent* OffscreenQmlRenderThread::Queue::take() {
|
|||
}
|
||||
|
||||
OffscreenQmlRenderThread::OffscreenQmlRenderThread(OffscreenQmlSurface* surface, QOpenGLContext* shareContext) : _surface(surface) {
|
||||
_canvas.setObjectName("OffscreenQmlRenderCanvas");
|
||||
qDebug() << "Building QML Renderer";
|
||||
if (!_canvas.create(shareContext)) {
|
||||
qWarning("Failed to create OffscreenGLCanvas");
|
||||
|
|
|
@ -21,6 +21,7 @@ using namespace gpu::gl;
|
|||
GLTextureTransferHelper::GLTextureTransferHelper() {
|
||||
#ifdef THREADED_TEXTURE_TRANSFER
|
||||
_canvas = QSharedPointer<OffscreenGLCanvas>(new OffscreenGLCanvas(), &QObject::deleteLater);
|
||||
_canvas->setObjectName("TextureTransferCanvas");
|
||||
_canvas->create(QOpenGLContextWrapper::currentContext());
|
||||
if (!_canvas->makeCurrent()) {
|
||||
qFatal("Unable to create texture transfer context");
|
||||
|
|
Loading…
Reference in a new issue