From a8455ac5fa250cf651cf9f6c66b82b51a5557f19 Mon Sep 17 00:00:00 2001 From: Samuel Nevala Date: Thu, 22 Oct 2015 14:02:28 +0300 Subject: ANGLE: Fix winrt backing store to support feature level 9_3 devices. Partially revert c7abf81786f4a0c. Instead of using the ES3 entry point, use ES2 for framebuffer blitting. This means that a small change is required to ANGLE for the blit behave the same as ES3 (applied only for Windows Store apps). Task-Id: QTBUG-48266 Change-Id: Idc51f00a659c91f740876be071eb71bff69e0e38 Reviewed-by: Andrew Knight --- src/plugins/platforms/winrt/qwinrtbackingstore.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/plugins/platforms/winrt/qwinrtbackingstore.cpp') diff --git a/src/plugins/platforms/winrt/qwinrtbackingstore.cpp b/src/plugins/platforms/winrt/qwinrtbackingstore.cpp index dcf8239538..ee54bf795c 100644 --- a/src/plugins/platforms/winrt/qwinrtbackingstore.cpp +++ b/src/plugins/platforms/winrt/qwinrtbackingstore.cpp @@ -42,8 +42,8 @@ #include #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -78,7 +78,6 @@ bool QWinRTBackingStore::initialize() d->context.reset(new QOpenGLContext); QSurfaceFormat format = window()->requestedFormat(); - format.setVersion(3, 0); // Required for ES3 framebuffer blit d->context->setFormat(format); d->context->setScreen(window()->screen()); if (!d->context->create()) @@ -121,13 +120,13 @@ void QWinRTBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo GL_RGBA, GL_UNSIGNED_BYTE, d->paintDevice.constScanLine(bounds.y())); glBindTexture(GL_TEXTURE_2D, 0); - glBindFramebuffer(GL_READ_FRAMEBUFFER, d->fbo->handle()); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + glBindFramebuffer(GL_READ_FRAMEBUFFER_ANGLE, d->fbo->handle()); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER_ANGLE, 0); const int y1 = bounds.y(); const int y2 = y1 + bounds.height(); const int x1 = bounds.x(); const int x2 = x1 + bounds.width(); - glBlitFramebuffer(x1, y1, x2, y2, + glBlitFramebufferANGLE(x1, y1, x2, y2, x1, d->size.height() - y1, x2, d->size.height() - y2, GL_COLOR_BUFFER_BIT, GL_NEAREST); -- cgit v1.2.3