|
From: Gaétan A. <gae...@be...> - 2016-12-14 22:32:51
|
Hi Geoff, Welcome in the amazing world of the powerful OpenGL ES of the Raspberry Pi. 1. first step is to compile SimGear (CMake + make + make install). I don't think that you need to recompile OSG. You can use the OSG package from Raspbian directly. 2. second step, compile FGPanel (CMake of FlightGear + make fgpanel + copy the binary in the FlightGear installation directory). You don't need to recompile all FlightGear, you just need the FGPanel binary. 3. Install FlightGear data to get the 2D panel of the C172. 4. check the amount of graphical memory. I have the first generation of Raspberry Pi with only 512 Mb of RAM. You need at least 256 Mb of graphical memory to run FGPanel. This can be configured in the file /boot/config.txt. The amount of graphical memory can be checked with the following command: vcgencmd get_mem gpu You need to reboot the Raspberry Pi to take into account the new amount of graphical memory. Before starting the FGPanel, you need to stop the X server (sudo systemctl stop lightdm.service). FGPanel runs in console mode (framebuffer, no X environment, no GLX, no GLUT, no PLib, just pure OpenGL ES 2.0 with some EGL to initialize the framebuffer). FGPanel has to run as root (sudo ./fgpanel) to be able to take control of the framebuffer. I'm using the panel of the C172 but the configuration files for FGPanel has been removed from the FlightGear data archive. I put the file that I'm using as attachment. You have to copy these files on both side (main computer + Raspberry Pi) in $FG_ROOT/fgdata/Aircraft/c172p/Panels/. To run the simulation On the Raspberry Pi : sudo fgpanel --fg-root=... \ --panel=Aircraft/c172p/Panels/FGPanel_c172p.xml On the main computer: fgfs \ --generic=socket,out,<hz>,<host>,34200,udp,../Aircraft/c172p/Panels/FGPanel_Protocol_c172p FGPanel uses TTF fonts that can be found in the $FG_ROOT/fgdata/Fonts/ directory. Hope this help, On Wed, 14 Dec 2016 20:27:45 +0100 Geoff McLane <ub...@ge...> wrote: > Hi Gaetan, > > What a great idea, being able to run > 'fgpanel' on my Raspberry Pi2... > > To my surprise, I have managed to > compile current OSG/SG/FG, and thus fgpanel, > using the fgmeta dnc script, in Raspbian 8, > jessie, but obviously not yet with your > updated source... > > And obviously without Qt5... but only a warning... > > But when I try to run ./fgpanel I get - > > freeglut (.fgpanel): OpenGL GLX extension not supported by display > ':0.0' > > So obviously, I have to do more RPI2 > setup... maybe use 'startx' or something... > or some other drivers... need help! > > Do you, or others, have some pointers on > getting this to work in RPI2... > > I note, in reviewing your modified fgpanel > CMakeLists.txt you use - > > find_path(BCMHOST_INCLUDE_DIR > NAMES bcm_host.h > PATHS /opt/vc/include > NO_DEFAULT_PATH ) > to later decide if we are in RPI? > > I can see this file does exist in my RPI2 > system... so that seems positive... > > It would be absolutely great if say the > c172p panel was displayed on RPI2 as I fly in > fgfs in other machines on my LAN... I certainly > hope this is merged... > > But need help... on list, or direct... thanks... > > Regards, Geoff. > > PS: Also, which panel file do you use? > > > On 13/12/16 15:21, Gaétan Allaert wrote: > > Hi, > > > > I put the new code of FGPanel in a branch ready to be merged: > > https://sourceforge.net/p/flightgear/flightgear/merge-requests/61/ > > > > Can this code be merged for the next release of FlightGear? > > > > Thanks, > > > > Gaetan > > > > On Sun, 30 Oct 2016 21:47:24 +0000 > > James Turner <zak...@ma...> wrote: > > > >>> On 30 Oct 2016, at 20:32, Torsten Dreyer <To...@t3...> wrote: > >>> > >>> excellent, thats great news. I have just downloaded the sources > >>> from your link and try to find some time and give it a try. I am > >>> somewhat busy preparing for the fsweekend so I might not have a > >>> chance for feedback before next week. > >>> > >>> If all runs nicely (and I have no doublt it will), I can merge it > >>> into the main fightgear code base. > >> Yes, that sounds excellent. > >> > >> Aside form PLIB / PUI, which I am working to replace, the panel > >> code and the HUD code are the two major places in FG which use > >> OpenGL 1 (there’s some other places, but those are ones that > >> really affect us). I made some start on converting the HUD to use > >> modern OpenGL drawing (collecting lines into arrays) but having > >> the panel code fixed is really beneficial. > >> > >> Kind regards, > >> James > >> > >> > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- \||/ There are only 10 kinds of people: /~ ~\ -Those who understand binary |@ @| -Those who don't |-oooO----(_)---Oooo---------------------------------------| Gaetan Allaert Key server : https://keyserver2.pgp.com/vkd/GetWelcomeScreen.event Key ID : 55472127 |