[Interest] Enable ANGLE in 5.2.1

Glenn Ramsey gr at componic.co.nz
Wed Jun 25 22:53:19 CEST 2014


On 25/06/14 17:46, Knight Andrew wrote:
> Hi,
>
>> Hi,
>>
>> I am trying to build a version of Qt 5.2.1 with VS2010 that will use ANGLE
>> for Qt Quick 2.0.
>>
>> Using these configure options
>>
>> configure.bat -prefix %CD%\qtbase -make-tool jom -nomake examples
>> -opensource -confirm-license -release -no-c++11 -icu -openssl -angle
>> -no-opengl
>>
>> I get build errors about stuff from the OpenGL headers not being found. If
>> I omit -no-opengl then it builds but my app doesn't use ANGLE.
>>
>> What configure options do I need to use?
>
> ANGLE is there to provide OpenGL, so you can't pass -no-opengl there. The
> correct switch is -opengl es2, but that is the default option anyway. For
> VS2010, you must also install the DirectX SDK and set the DXSDK_DIR
> environment variable so that configure can find it.
>
> -Andrew
>
>> Glenn

Thanks Andrew,

I did that and it seems to be built correctly. I have a libGLESv2.dll and it has 
a dependency on D3D9.dll. My test app still doesn't work though. That appears to 
be due to this
https://bugreports.qt-project.org/browse/QTBUG-29925
but the error message is slightly different. I am trying to run it on Windows 7 
in a Virtualbox VM.

For completeness' sake here are the details.

The app is a PyQt5 app packaged with PyInstaller (code snippets below)

I get this error:

file://path/to/hello.qml:1
:1: module "QtQuick" is not installed
      import QtQuick 2.0
      ^
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(void):
Could not initialize egl display: error 12289

QtQuick: failed to create OpenGL context

Glenn

hello.qml:

import QtQuick 2.0

Rectangle {
     width: 360
     height: 360
     Text {
         anchors.centerIn: parent
         text: "Hello World"
     }
     MouseArea {
         anchors.fill: parent
         onClicked: {
             Qt.quit();
         }
     }
}

hello.py:
...
def main():
     global a
     a = QApplication(sys.argv)

     q = QQuickView()
     if getattr(sys, 'frozen', None):
         basedir = sys._MEIPASS
     else:
         basedir = os.path.dirname(__file__)

     q.setSource(QUrl.fromLocalFile(os.path.join(basedir, 'hello.qml')))
     q.engine().quit.connect(a.quit)
     q.show()
     a.exec_()




More information about the Interest mailing list