Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5.1 Android : OpenGL in QWidget
Forum Updated to NodeBB v4.3 + New Features

Qt5.1 Android : OpenGL in QWidget

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user28
    wrote on 29 Aug 2013, 02:37 last edited by
    #1

    Hi All,

    I am investigating if there is any pathway to temporarily work around the QGLWidget fullscreen issue on android.
    Currently , in Qt5.1 android, only one full screen opengl surface is provided. The application that I am currently porting to android is heavily dependent on QWidgets. So, rewriting it in QML is not feasible.

    I have been trying to render opengl content in QWidget directly and not use QGLWidget/QGraphicsView.

    I have tried the below options.

    • Create a QML window to render opengl and embed it in QWidget using createWindowContainer().
      -- Does not work on android in QT5.1
    • Use QWindow with QOpenGLContext to render opengl and embed it in QWidget using createWindowContainer(). -- Does not work on android in QT5.1
    • Use standard opengl calls in QWidget and create an opengl surface and render opengl content using it.
      I am currently stuck with getting native window handle of QWidget to pass to eglCreateWindowSurface(). On windows this could be done by getting QWidget::winId(). winId() does not return proper value on android. I have been looking at Qt's opengl and raster plugin source code. The opengl plugin stores nativewindow obtained with ANativeWindow_fromSurface(). There is no such code in raster plugin.
      Is there any way to get EGLNativeWindowType* handle of QWidget on android?

    I would appreciate any suggestion on rendering opengl directly in QWidget so that I could use it along with other GUI widgets.

    1 Reply Last reply
    0

    1/1

    29 Aug 2013, 02:37

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved