Irrlicht on Raspberry PI

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!
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Irrlicht on Raspberry PI

Post by Thalhammer »

Hello,
I got my Raspberry PI last days and tried to get Irrlicht working on it.
I know that theres an ogl es version of irrlicht and downloaded it.
But as there is no X on the Rpi i tried to adapt this
http://benosteen.wordpress.com/2012/04/ ... x-windows/
into the irrlicht code.
But it always says there would only be the Nulldevice available without X.
Can someone help me to get an working irrlicht on the Raspberry Pi ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht on Raspberry PI

Post by hybrid »

Well, the FB device would be the correct place to do this low-level stuff here. Though this device is rather unmaintained so far, and will become really awful once we get in all those ifdefs for all those framebuffer devices we have to support. Anyway, you should put it there and enable the device via a proper IrrCompile setting. For Irrlicht, we have the platform setting, which would be Linux in this case. And we have the device setting, which is doing the windowing stuff. In this case, you want raw access to the framebuffer, so use the FB device.
A problem might arise once you want keyboard or mouse events. Don't know how this works without X...
I hope to get my Pi in the next days as well, so maybe I can help you out then.
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

No I don't want to access the Linux Framebuffer like LinuxFB does.
I wan't to access the Broadcom Framebuffer, which is not the same, for example the Linux FB has an Resolution of 656x416 pixel, but the Broadcom FrameBuffer has an resolution of 720x480pixel.
But I already tried to compile in the FB Device and it did not work.
But what I got to compile in is the OPENGLES 2 Driver including my code, but it is unable to draw anything.
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irrlicht on Raspberry PI

Post by ACE247 »

Cool beans! Pi-licht, Pirrlicht ? :D
Allthough, I don't intend to use my Pi for Irrlicht but for my robot instead.
Oh why am I still waiting for it though...
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

Im not sure if i'am just too stupid to get it working, or if there are too many error's in Irrlicht-gles.
But I don't get it working, after a lot of work modifing, I got it to compile in all the needed files, but as soon as I start the engine I get alot of Errors in OpenGL, including No Picture. But if I use another OpenGLES Demo, which does include just everything that is absolutly necessary it works fine.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht on Raspberry PI

Post by hybrid »

No, you understood me wrong. You cannot use the FB device as it is now. But you have to provide the access there, enable access to the ogl-es drivers in the fb device, and adapt the ogl-es driver to the device. It's quite some work and you have to make sure that the whole chain is working.
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

That's nearly the same work as rewriting the whole Device.
Another way would be to modify the OpenGL Render:
http://code.google.com/p/gl-wes-v2/
Replacing the normal OGL Funktions with this could probably solve the problem and wouldn't be a problem as Real OpenGL will never be needed on an Raspi.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht on Raspberry PI

Post by hybrid »

No, IMHO this wouldn't help a bit, as you're stuck not with missing OpenGL functions, but a proper device and window creation. So you need to fix up an Irrlicht device to provide the things you need. No way around. Later on you have to see which render functions are supported by your driver of choice, and how to overcome problems there. But that's a second or third step from here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht on Raspberry PI

Post by hybrid »

Ok, here's a quick hack of the proposed interface into the Linux device of Irrlicht: http://pastebin.com/arTJ2Ug3
It's definitely not a clean implementation, as I have quick hacked the nativewindow struct into the display pointer, etc. But IMHO this should result in a proper ogl-es window on raspi. I couldn't test it, yet, as I only have the qemu emulator. But it compiles and runs until it tries to communicate withthe GPU. I will fix this further once I have the Pi here.
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

I'll try it out and report if it works
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

First I have to thank, because There is rendered something.
After a few changes the engine compiles fine and even the demo scene is working fine(using the OGLES 1 driver) if i compile with X11 Support.
I can't say if it works because i applyed a patch to libEGL.so:
http://www.youtube.com/watch?v=8Fy63w6WxOw
or because of the modifications made by hybrid, but until now I didn't get any Picture.
Later I will disable X11 Support in IrrCompileConfig.h and see if it works again.
But for that I will use an new Image of Raspbian, because i don't have a backup of my libEGL.so and also because there where alot of changes regarding audio support some time ago.
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

Yes its working!
Realy good work, thanks.
But I think it would be the best to create a seperate branch for embedded devices, that only contains things realy needed, but also some things which are quite fine, for example the h264 decoder that makes it possible to decode FULLHD movies with just 13% CPU Load.
I think i'll create something like that if I have some free time, also a driver for the GPIO ports and the onboard Led would be fine.

Thank you so far.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht on Raspberry PI

Post by hybrid »

Uhm, wrong board? If you want a movie player, you can provide one and link it into your app. These are often quite specialised, and need dedicated drivers even on non-embedded platforms. Access to LEDs and GPIOs is not yet forseen in the I/O system of Irrlicht, but in case we would generalize the I/O classes, it might be introduced. For now, you can also just do some low-level access from you apps logic. Nothing special. So nothing at all which would justify a branch of Irrlicht.
I'm not sure, yet, into which part I will put those devices. I have to check the implementation and handling, and also the I/O system used on the Pi.
Thalhammer
Posts: 11
Joined: Mon Dec 06, 2010 9:50 pm

Re: Irrlicht on Raspberry PI

Post by Thalhammer »

If you want a movie player
No but things like a movie texture for hud's ore something like this would be quite cool.
OK the I/O things are not realy right placed in a grafiks engine.
But i didn't mean a seperate branch of Irrlicht, I mean a complete engine including sound, network, physiks, but also I/O etc just for the Raspberry PI.
By the way using OGLES1 the QuakeMap demo runs at 23 FPS on a Fullscreen TV.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Irrlicht on Raspberry PI

Post by sudi »

Hey Thalhammer could you please explain what exactly you did to compile irrlicht and programms on the raspberry pi. Would be really helpfull.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Post Reply