QOpenGLWindow: set QOffScreenSurface screen

Required by QWasmOpenGLContext.

Task-number: QTBUG-75463
Change-Id: Ie3cb80b50d7c909e6f46a6dec19644bf27cd41e7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Morten Johan Sørvig 2019-04-29 09:52:55 +02:00 committed by Jani Heikkinen
parent 77216c5c52
commit 1c7b5c20a5
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ void QOpenGLWindow::makeCurrent()
d->context->makeCurrent(this);
} else {
if (!d->offscreenSurface) {
d->offscreenSurface.reset(new QOffscreenSurface);
d->offscreenSurface.reset(new QOffscreenSurface(screen()));
d->offscreenSurface->setFormat(d->context->format());
d->offscreenSurface->create();
}