Results 1 to 15 of 15

Thread: Simple Qt Quick example isn't drawn in android emulator

  1. #1
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Simple Qt Quick example isn't drawn in android emulator

    By default then creating new Qt Quick 1.3 project it creates stub with 3 buttons and menu. It works fine on my smartphone but in emulator (tried standard one and genymotion, armv7 and x86) it doesn't draw anything. Only white screen. But if I "touch" (click) there buttons are supposed to be it reacts with a pop up as it should. Some part of error log in console at the moment: http://pastebin.com/1e7ZiGKq

    I don't get what is wrong and because I haven't found any mentions of this or threads I think it's some sort of the bug/misconfiguration and it should work correctly. How to solve this problem? P.S. Normal QWidget app works fine.

    QT 5.4.1, Win 8.1

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    It seems that the code uses a dialect of GLSL unsupported by the emulator (e.g. OpenGLES vs OpenGL). The emulator probably requires the desktop (OpenGL) dialect since that's what your system has.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    It seems that the code uses a dialect of GLSL unsupported by the emulator (e.g. OpenGLES vs OpenGL). The emulator probably requires the desktop (OpenGL) dialect since that's what your system has.
    But it's an ANDROID app. And It launches on my 4.2.2 smartphone just fine. Furthermore, it's just example that is automatically generated when you create new qt quick project - with to buttons and menu bar. Either both major emulators doesn't support GLES at all and no one ether mentions this on the internet or there is some problem with configuration/qt.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by flashmozzg View Post
    But it's an ANDROID app.
    But it's running on an EMULATOR on a desktop machine equipped with OpenGL.

    And It launches on my 4.2.2 smartphone just fine.
    Because the phone has OpenGLES and not OpenGL.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    But it's running on an EMULATOR on a desktop machine equipped with OpenGL.
    Because the phone has OpenGLES and not OpenGL.
    But emulator converts GLES 2 to GL 2.0. At least since 2012:
    http://android-developers.blogspot.c...-hardware.html

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Apparently either it doesn't (or does it incorrectly) for this shader or it does and it shouldn't be. Either way you are trying to run a shader incompatible with what the GLSL compiler expects.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    Apparently either it doesn't (or does it incorrectly) for this shader or it does and it shouldn't be. Either way you are trying to run a shader incompatible with what the GLSL compiler expects.
    I run emulator on my notebook (win 8.1 x64 too) and it worked there like it should, so there some bug with it on my desktop.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Your desktop probably has a different graphics card vendor than your laptop so you have two differently behaving GLSL compilers. Maybe try disabling the glsl-translation feature in your emulator and see if it helps.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    Your desktop probably has a different graphics card vendor than your laptop so you have two differently behaving GLSL compilers. Maybe try disabling the glsl-translation feature in your emulator and see if it helps.
    Without glsl translation it simply won't work : E/libEGL ( 1079): called unimplemented OpenGL ES API

    New, more complete log (it captures some java exceptions at the start) :
    http://pastebin.com/eJrYLcnb

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    You still get the same error about precision modifiers being already defined.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    You still get the same error about precision modifiers being already defined.
    Yep.
    I managed to run some GLES api tests in emulator and they worked fine. Only qt app has problems so far. Furthermore it even crashes my driver and hangs sometimes when it tries to deploy from qt creator to emulator. Don't know if it's qt problem or not and how to deal with this problem.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by flashmozzg View Post
    I managed to run some GLES api tests in emulator and they worked fine.
    They are using different shaders so that's obvious.

    Furthermore it even crashes my driver and hangs sometimes when it tries to deploy from qt creator to emulator. Don't know if it's qt problem or not and how to deal with this problem.
    I think that's unrelated.

    Did you try turning of the shader translation in the emulator?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #13
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    They are using different shaders so that's obvious.
    Did you try turning of the shader translation in the emulator?
    What is the way to do it?

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by flashmozzg View Post
    What is the way to do it?
    No idea, consult the emulator documentation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  15. #15
    Join Date
    Feb 2015
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Simple Qt Quick example isn't drawn in android emulator

    Quote Originally Posted by wysota View Post
    No idea, consult the emulator documentation.
    If you mean translation from openGL ES emu calls to openGL on my PC, I tried that, see #9 post. It won't draw anything at all since it requires GLES to draw qt quick interface.

Similar Threads

  1. Replies: 2
    Last Post: 21st December 2014, 12:01
  2. Replies: 1
    Last Post: 22nd September 2013, 14:40
  3. problem with android emulator
    By jvlach in forum Newbie
    Replies: 0
    Last Post: 2nd February 2012, 13:46
  4. Replies: 0
    Last Post: 3rd January 2011, 23:34
  5. Replies: 3
    Last Post: 6th March 2009, 16:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.