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. Qt + Android + Irrlicht. Need to get android_app*
QtWS25 Last Chance

Qt + Android + Irrlicht. Need to get android_app*

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidirrlicht
4 Posts 2 Posters 1.7k Views
  • 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.
  • C Offline
    C Offline
    crazymax
    wrote on last edited by crazymax
    #1

    Hi all.
    I've built Irrlicht folowing this guide: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=5&t=49755
    27.HelloWorld_Android example of Irrlicht works nice on my phone.
    But now I try to port project, which uses Irrlicht, to Android with my built Irrlicht lib.
    This lib uses android_app* which it gets from
    void android_main(android_app* app)
    I don't provide it, so my irrlicht widget crashes.

    What is the simplest way to solve it?
    Is there any way to get android_app pointer without android_main or rewriting irrlicht source code?

    edited: I think a main question is "How can I obtain android_app* in Qt?"

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I haven't use Irrlicht but shouldn't you rather try to run Irrlicht in a QWindow/QWidget ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        crazymax
        wrote on last edited by
        #3

        I use QWidget over Irrlicht and it works fine with desktop version of Irrlicht lib.
        The problem is that android irrlicht lib expects android_app* pointer in parameters. android_app* is provided by android_main function. And I see 3 ways to solve it:

        1. obtain android_app* in Qt and provide it in parameters. So the question - how to obtain it?
        2. rewrite some source code of irrlicht android lib, but I think it's wrong way
        3. try to build android lib from desktop irrlich lib source code by ndk-build, but I think it's worse than 2nd way.
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can also try asking the Irrlicht devs to see if they came across that use case.

          One other source of information is the Android-development mailing list You'll find there Qt's Android port developers/maintainers (this forum is more user oriented)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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