You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
Me and a few friends are working on a project and we are trying to integrate Qt 5.5 with Irrlicht and are having a lot of trouble with the integration. We have Sydney on a widget but she does not animate , it seems like there is only one frame and then she is frozen. There are several examples online but none of them seem to work. We have tried the following integrations and none of them seem to work:
http://irrlicht.sourceforge.net/forum/v ... =5&t=50533
We got this one to load the map into a widget; but either this map is not animated or it has the same issue with the single frame and being frozen. We could not get an animated Sydney to show up on the screen
We have tried to integrate the code from this GitHub project https://github.com/kashin/EngineTest
But the code seems to be entirely dependent on the widget being the central widget; which will not always be the case in our project.
Here is our project repo, the code is under qirrlichtwidget.* as is: https://github.com/ComradeKeys/dmux
Does anyone have a working proof of concept to integrate the two APIs? Or any suggestion on which integration we should use?
Last edited by bkeys on Sun Feb 28, 2016 5:41 pm, edited 1 time in total.
I wouldn't call the issue "solved" so much as "resolved". Sorry you couldn't get it to work. I wonder if things changed in Qt recently that have made this more difficult. o_o
I think the topic has come up a few times already. The problem is simply that there are not many people around doing that, so it's hard to find someone who can help (I can't for example, simply haven't ever done this).
If you carefully go through the post that they referenced as above.
They need to do below.
"There is one bug, if you use the default MainWindow. There will be an assertion bug caused by zero size or empty action menu.
Just add at least one action then its fixed."
UPDATE: Sorry about my immature behavior with this post, I was having a very bad day and looking back I feel the need to apologize for this. So I am sorry about what I posted on this day, it will not happen in the future.
I've played with this recently and it is actually pretty straightforward. The current Ogre3D approach is to base everything off a QWindow and use the Qt createWindowContainer() function if you want to put the window content in a widget. This is the approach shown in the Qt5 demo OpenGLWindow and just offloads all the window painting to something else. You can thus do exactly the same with Irrlicht. The code isn't very different from the QWidget version in the FAQ but I think it is a little cleaner because there is less to reimplement and mouse and keyboard grabbing are done for you. The things that are easy to forget to do are to call getTimer()->tick() regularly otherwise animation won't work because we aren't using the Irrlicht run() method, and you do need to worry about window resizing. getVideoDriver()->OnResize() in the resizeEvent() handler seems the most popular option but depending on how you are setting up your rendering you may need to do other things to get the effect you want.
However this process does show up some inconsistencies in some of the drivers. I get screen artefacts in the Mac OpenGL driver (but not the Windows OpenGL driver) when I increase the window size (but not decrease it) and I haven't found a good way of fixing that. The software renderer works OK. I also find that resizing affects the viewport quite oddly and after resizing (on the Mac anyway) I find that the view has shifted and I get clipping halfway up the window. That might be my code though. I don't resize windows very often and the work around is to completely reinitialise the driver after a resize. It's not an ideal solution but I don't fancy trying to track down what is going on in both the Irrlicht and the Qt code.
Wol101 wrote:I've played with this recently and it is actually pretty straightforward. The current Ogre3D approach is to base everything off a QWindow and use the Qt createWindowContainer() function if you want to put the window content in a widget. This is the approach shown in the Qt5 demo OpenGLWindow and just offloads all the window painting to something else. You can thus do exactly the same with Irrlicht. The code isn't very different from the QWidget version in the FAQ but I think it is a little cleaner because there is less to reimplement and mouse and keyboard grabbing are done for you. The things that are easy to forget to do are to call getTimer()->tick() regularly otherwise animation won't work because we aren't using the Irrlicht run() method, and you do need to worry about window resizing. getVideoDriver()->OnResize() in the resizeEvent() handler seems the most popular option but depending on how you are setting up your rendering you may need to do other things to get the effect you want.
However this process does show up some inconsistencies in some of the drivers. I get screen artefacts in the Mac OpenGL driver (but not the Windows OpenGL driver) when I increase the window size (but not decrease it) and I haven't found a good way of fixing that. The software renderer works OK. I also find that resizing affects the viewport quite oddly and after resizing (on the Mac anyway) I find that the view has shifted and I get clipping halfway up the window. That might be my code though. I don't resize windows very often and the work around is to completely reinitialise the driver after a resize. It's not an ideal solution but I don't fancy trying to track down what is going on in both the Irrlicht and the Qt code.
We are now using the CEGUI framework with our project which uses the Irrlicht renderer so we are not having this issue anymore.