[Interest] QWebEngine makes QApplication ignore AA_UseOpenGLES

Shantanu Tushar shaan7in at gmail.com
Mon Jul 6 08:44:17 CEST 2015


Hi,

As most of our userbase need it, we force our Qt app to use ANGLE on
Windows machines -

app.setAttribute(Qt::AA_UseOpenGLES);

just after setting the app name, organization etc.

We recently started using QWebEnginePage to load a webpage from our website
because it serves some features. The problem is that the moment our code
has a place where we create an object of QWebEnginePage, the AA_UseOpenGLES
flag is ignored and the app always runs in OpenGL mode.

Any suggestions/workarounds to fix this?


---- Output when forcing GLES but no QWebEngine use ----
qt.qpa.gl: GPU features: QSet()
qt.qpa.gl: QWindowsOpenGLTester::supportedGlesRenderers
GpuDescription(vendorId=0x15ad, deviceId=0x405, subSysId=0x40515ad,
revision=0, driver: "vm3dum.dll", version=8.14.1.51, "VMware SVGA 3D")
renderer:  QFlags(0x2|0x4|0x8|0x20)
qt.qpa.gl: Qt: Using EGL from libEGL.dll
qt.qpa.gl: Qt: Using OpenGL ES 2.0 from libGLESv2.dll
qt.qpa.gl: QWindowsEGLStaticContext::create Created EGL display 0x762a38 v
1 . 4
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext
QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24,
redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize
-1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1,
profile  0)

---- Output when forcing GLES and creating an object of QWebEngine ----
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext
QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1,
redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize
-1, stencilBufferSize -1, samples -1, swapBehavior 0, swapInterval 1,
profile  0)
qt.qpa.gl: Basic wglCreateContext gives version 2.0
qt.qpa.gl: OpenGL 2.0 entry points available
qt.qpa.gl: GPU features: QSet()
qt.qpa.gl: QWindowsOpenGLTester::supportedRenderers
GpuDescription(vendorId=0x15ad, deviceId=0x405, subSysId=0x40515ad,
revision=0, driver: "vm3dum.dll", version=8.14.1.51, "VMware SVGA 3D")
renderer:  QFlags(0x1|0x2|0x4|0x8|0x20)
qt.qpa.gl: Qt: Using WGL and OpenGL from "opengl32.dll"
qt.qpa.gl: QOpenGLStaticContext::create OpenGL: "VMware, Inc.","Gallium 0.4
on SVGA3D; build: RELEASE;  " default ContextFormat: v2.0 profile: 0
options: QFlags(0x4),SampleBuffers
Extensions: 137
qt.qpa.gl: QWindowsGLContext::QWindowsGLContext 0x8bf9e0 GDI  requested:
QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1,
redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize
-1, stencilBufferSize -1, samples -1, swapBehavior 0, swapInterval 1,
profile  0)
    obtained # 35 GDI QSurfaceFormat(version 2.0, options QFlags(0x4),
depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8,
alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior 2,
swapInterval 1, profile  0)
     PIXELFORMATDESCRIPTOR dwFlags=0x8425 PFD_DRAW_TO_WINDOW
PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0
cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8
cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 iLayerType=0
cAlphaBits=8 cAlphaShift=24  swap interval:  0
    default:  ContextFormat: v2.0 profile: 0 options: QFlags(0x4)
    HGLRC= 0x30000
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext
QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24,
redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize
-1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1,
profile  0)
qt.qpa.gl: QWindowsGLContext::QWindowsGLContext 0x35b4ea8 GDI  requested:
QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24,
redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize
-1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1,
profile  0)
    obtained # 35 GDI QSurfaceFormat(version 2.0, options QFlags(0x4),
depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8,
alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior 2,
swapInterval 1, profile  0)
     PIXELFORMATDESCRIPTOR dwFlags=0x8425 PFD_DRAW_TO_WINDOW
PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0
cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8
cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 iLayerType=0
cAlphaBits=8 cAlphaShift=24  swap interval:  0
    default:  ContextFormat: v2.0 profile: 0 options: QFlags(0x4)
    HGLRC= 0x10002

----


Thanks,

-- 
Shantanu Tushar    (UTC +0530)
shantanu.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150706/2830867b/attachment.html>


More information about the Interest mailing list