Page 1 of 1

Irrlicht port for Sailfish/Wayland (landscape orientation)

Posted: Wed Sep 27, 2017 12:31 pm
by savegame
Hi everyone!
I am working on porting Irrlicht 1.9 GLES version to Sailfish OS devices (which use Wayland protocol for window management). Porting is nearly done, now i just want rewrite code to more clear. Here

Code: Select all

https://github.com/savegame/sailfish-irrlicht
you can download alpha version of ported engine, you can download Sailfish SDK and compile it.
Porting is not done, in irrlicht need more touch events handling in GUI. If you have some games, which uses Irrlicht engine and compatible with GLESv2 please port you games, and public it in Jolla store, or on OpenRepos. Sailfish OS really need more cool stuff, like 3D games :wink:
And i have a question for experienced people =) How i can rotate Irrlicht's render to another orientation (without rendering to buffer and paint texture on screen). Maybe some projection, or view matrix for camera, or something like that?
Some screenshot i put in https://together.jolla.com/question/165 ... ngine-port
Here screenshot of from my phone, which worked on Sailfish OS 8)
Image

P.S. Cant paste [url] tag for hiding Url's ...

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Thu Sep 28, 2017 12:34 am
by CuteAlien
edit: Sorry, message got first messed up - our forum server is really bad last days and posting becomes tricky :-(

I only found out about rotation problems 2-3 weeks ago while hunting another bug. Don't know if it's a general ES 2 problem or something device specific. I know on Android there is an event send when the rotation happens, but don't know yet how we have to handle it. Have to invest some time there. Also... once I noticed that problem I also started wondering about surface handling in general. As right now users can set some small resolution - and then Irrlicht draws for example in a small corner of the Window instead of using the real surface solution it has. Which looks wrong to me (as device-size should be real size and it messed for example the GUI and cursor-handling up). But as I didn't write the code it's one of those cases where I have to figure out if there might have been some reason why it got implemented like this.

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Thu Dec 14, 2017 12:11 pm
by savegame
I can receive event when device rotate, its not a problem, a cant rotate render as it need. I can set Up vector of camera, but it not what i am whant/ Only one way now i see, render all to texture buffer, then draw texture on screen with shader transformation... in that way, I'll be able to change the resolution of the render and draw it stretched to full screen, if it need

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Sun Mar 25, 2018 9:26 am
by savegame
Ok,now i try to port CuteAlien's game H-Craft =)
i am already build it for sailfish, and it work =) But on emulator i can play it, because i have hard keyboard, but on device i cant... i working on it =)
Image

Oh, sorry =)
found
, mUseTouchInput(ETI_TOUCH_HARDWARE)
an use it in sailfish, it onscreen keyboard =)

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Sun Mar 25, 2018 12:24 pm
by CuteAlien
Wohoo!!! :-)

edit: Btw... the STK guys also wrote a Wayland port recently: https://github.com/supertuxkart/stk-cod ... ayland.cpp
So when you run into troubles you can also take a look there now.

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Sun Mar 25, 2018 9:55 pm
by savegame
i am already view their code, and it has not touch implementation, and use XDG, i am use pure wayland with touch events, device rotation events (not hyroscope, just screen orientation ).
but the next trouble - is change rendering in game, render all game to RenderTarget texture, then draw it in right orientation.

Re: Irrlicht port for Sailfish/Wayland (landscape orientatio

Posted: Wed Apr 04, 2018 9:12 pm
by savegame
Good news! i am modify rendering in game, add render target and rotate rendering in landscape orientation!
Bad news ) : SailfishOS has OpenAL library, but it depricated and not work, need to rewrite sound output :?
Screenshot: game running on Innoi R7 device, works nice and fast =)
Image