PDA

View Full Version : Compile for ANGLE Visual Studio Android Emulator



Dragone
11th January 2016, 20:52
Hi folks
I am just trying to make my first steps with Qt Framework.

My final goal is to create a cross Platform mobile application.

I created a Qt Quick 2 Hello World app, and I started playing with that.
It compiles and runs correctly with Windows, Windows Phone (emulator or device) and Android Genymotion.

I am corrently using Windows 10, Qt 5.5 and last version of pretty much everything I mentioned.

What I have not managed to accomplish is to use the Visual Studio Android Emulator.

The app is not rendered in the emulator and only a White screen is showed. If I click on the background the app closes (and this is correct accordingly to the Hello World example app), so it means the app is running indeed and the problem is related only to rendering.

Official Visual Studio Android emulator documentation says :

"If your app makes direct or indirect use of OpenGL ES 3.0 or higher, it may not render on our emulator. This is because we use the open source ANGLE (Almost Native Graphics Layer Engine) project to convert OpenGL ES calls to DirectX before they are forwarded to run on the host machine's GPU. ANGLE supports most OpenGL ES 3.0 APIs, but a few have yet to be implemented. However, OpenGL ES 2.0 works correctly."

If I use OpenGL Viewer App in Genymotion I can read "OpenGL ES 2.0 (3.3)". If I use OpenGL Viewer App in Visual Studio Android emulator I can read "OpenGL ES 2.0" (without 3.3 or whatever).

Do I have to use QSurfaceFormat to make explicit use of lower OpenGL version ?
If I am right, can somebody make an example for me ?

Thank you in advance
Greetings

Dragone
12th January 2016, 15:16
D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D GLHostConnection: Waiting for host to establish connection for PID 17023 (org.qtproject.example.TestMobile)
D GLHostConnection: HostConnection::get() New Host Connection established 0xac1b7dd0, tid 17023
D GLHostConnection: Waiting for host to establish connection for PID 17023 (org.qtproject.example.TestMobile)
D GLHostConnection: HostConnection::get() New Host Connection established 0xaf692eb0, tid 17036
I OpenGLRenderer: Initialized EGL, version 1.4
W EGL_emulation: eglSurfaceAttrib not implemented
W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabb13ca0, error=EGL_SUCCESS
W linker : /data/data/org.qtproject.example.TestMobile/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: is missing DT_SONAME will use basename as a replacement: "libqtquick2plugin.so"
W linker : /data/data/org.qtproject.example.TestMobile/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: is missing DT_SONAME will use basename as a replacement: "libwindowplugin.so"
D GLHostConnection: Waiting for host to establish connection for PID 17023 (org.qtproject.example.TestMobile)
D GLHostConnection: HostConnection::get() New Host Connection established 0xa1c0c890, tid 17037
D GLHostConnection: Waiting for host to establish connection for PID 17023 (org.qtproject.example.TestMobile)
D GLHostConnection: HostConnection::get() New Host Connection established 0xabb020b0, tid 17040
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
01-12 15:01:33.092 17023 17040 W libTestMobile.so:
W libTestMobile.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libTestMobile.so: (null):0 ((null)): #define lowp
W libTestMobile.so: #define mediump
W libTestMobile.so: #define highp
W libTestMobile.so: #line 1
W libTestMobile.so: varying lowp vec4 color;
01-12 15:01:33.092 17023 17040 W libTestMobile.so:
W libTestMobile.so: void main()
W libTestMobile.so: {
W libTestMobile.so: gl_FragColor = color;
W libTestMobile.so: }
W libTestMobile.so: (null):0 ((null)): ***
W libTestMobile.so: (null):0 ((null)): shader compilation failed:
W libTestMobile.so: ""
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:4: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:5: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:6: '' : No precision specified for (float)
01-12 15:01:33.100 17023 17040 W libTestMobile.so:
W libTestMobile.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libTestMobile.so: (null):0 ((null)): #define lowp
W libTestMobile.so: #define mediump
W libTestMobile.so: #define highp
W libTestMobile.so: #line 1
W libTestMobile.so: varying highp vec2 sampleCoord;
01-12 15:01:33.100 17023 17040 W libTestMobile.so:
W libTestMobile.so: uniform mediump sampler2D _qt_texture;
W libTestMobile.so: uniform lowp vec4 color;
W libTestMobile.so: uniform mediump float alphaMin;
W libTestMobile.so: uniform mediump float alphaMax;
01-12 15:01:33.100 17023 17040 W libTestMobile.so:
W libTestMobile.so: void main()
W libTestMobile.so: {
W libTestMobile.so: gl_FragColor = color * smoothstep(alphaMin,
W libTestMobile.so: alphaMax,
W libTestMobile.so: texture2D(_qt_texture, sampleCoord).a);
W libTestMobile.so: }
W libTestMobile.so: (null):0 ((null)): ***
W libTestMobile.so: (null):0 ((null)): shader compilation failed:
W libTestMobile.so: ""
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
01-12 15:01:33.141 17023 17040 W libTestMobile.so:
W libTestMobile.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libTestMobile.so: (null):0 ((null)): #define lowp
W libTestMobile.so: #define mediump
W libTestMobile.so: #define highp
W libTestMobile.so: #line 1
W libTestMobile.so: varying lowp vec4 color;
01-12 15:01:33.141 17023 17040 W libTestMobile.so:
W libTestMobile.so: void main()
W libTestMobile.so: {
W libTestMobile.so: gl_FragColor = color;
W libTestMobile.so: }
W libTestMobile.so: (null):0 ((null)): ***
W libTestMobile.so: (null):0 ((null)): shader compilation failed:
W libTestMobile.so: ""
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:4: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:5: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:6: '' : No precision specified for (float)
01-12 15:01:33.167 17023 17040 W libTestMobile.so:
W libTestMobile.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libTestMobile.so: (null):0 ((null)): #define lowp
W libTestMobile.so: #define mediump
W libTestMobile.so: #define highp
W libTestMobile.so: #line 1
W libTestMobile.so: varying highp vec2 sampleCoord;
01-12 15:01:33.167 17023 17040 W libTestMobile.so:
W libTestMobile.so: uniform mediump sampler2D _qt_texture;
W libTestMobile.so: uniform lowp vec4 color;
W libTestMobile.so: uniform mediump float alphaMin;
W libTestMobile.so: uniform mediump float alphaMax;
01-12 15:01:33.167 17023 17040 W libTestMobile.so:
W libTestMobile.so: void main()
W libTestMobile.so: {
W libTestMobile.so: gl_FragColor = color * smoothstep(alphaMin,
W libTestMobile.so: alphaMax,
W libTestMobile.so: texture2D(_qt_texture, sampleCoord).a);
W libTestMobile.so: }
W libTestMobile.so: (null):0 ((null)): ***
W libTestMobile.so: (null):0 ((null)): shader compilation failed:
W libTestMobile.so: ""
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
01-12 15:01:33.206 17023 17040 W libTestMobile.so:
W libTestMobile.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libTestMobile.so: (null):0 ((null)): #define lowp
W libTestMobile.so: #define mediump
W libTestMobile.so: #define highp
W libTestMobile.so: #line 1
W libTestMobile.so: varying lowp vec4 color;
01-12 15:01:33.206 17023 17040 W libTestMobile.so:
W libTestMobile.so: void main()
W libTestMobile.so: {
W libTestMobile.so: gl_FragColor = color;
W libTestMobile.so: }
W libTestMobile.so: (null):0 ((null)): ***
W libTestMobile.so: (null):0 ((null)): shader compilation failed:
W libTestMobile.so: ""
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
W libTestMobile.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:4: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:5: '' : No precision specified for (float)
W libTestMobile.so: ERROR: 0:6: '' : No precision specified for (float)