[Interest] Force Qt 5.4 to use ANGLE OpenGL ES 2 implementation

Sean Harmer sean.harmer at kdab.com
Sun Feb 15 17:26:11 CET 2015


On Sunday 15 February 2015 11:55:56 Roberto Garrido MartĂ­n wrote:
> Hi,
> 
> On 15 February 2015 at 10:08, Andrew Knight <qt at panimo.net> wrote:
> > FTA, use the QT_OPENGL environment variable (set QT_OPENGL=angle) or the
> > application attribute
> > (QCoreApplication::setAttribute(Qt::AA_UseOpenGLES)).
> > From your results below, it doesn't appear you've tried either.
> 
> Setting QCoreApplication::setAttribute(Qt::AA_UseOpenGLES) actually worked,
> thanks!
> Here the debug message:
> 
> qt.qpa.gl: Qt: Using EGL from libEGLd.dll
> qt.qpa.gl: Qt: Using OpenGL ES 2.0 from libGLESv2d.dll
> qt.qpa.gl: QWindowsEGLStaticContext::create Created EGL display 0x4dc49c8 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)
> 
> 
> Now I'm having another error. We are using Glew-1.12.0 in order to load the
> non-Core OpenGL 1.1 functions on windows. In order to initialize
> Glew-1.12.0, glewInit() must be called first. it returns GLEW_OK when the
> initialization was successfull. It does work with Desktop OpenGL , but with
> GLES it returns "Missing GL Version".

Pick OpenGL ES or desktop OpenGL, not both. If you need to use the 3rd party 
renderer that uses ES 2, you will need to restrict yourself to OpenGL ES 2 
too.

Cheers,

Sean

--
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions



More information about the Interest mailing list