Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 02-08-2014, 11:52   #316
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by sparticle View Post
Ok did that. The first command works.

glxgears opens a window but no gears appear and I get:

ERROR: EGL Error detected: EGL_BAD_DISPLAY: (0x3008)
Just keeps scrolling.



Cheers
Spart
I know I said before to move libGL.so.1 to libGL.so but the guy who wrote the instructions clearly didn't need to.

anyway... try this glshim:

https://github.com/lunixbochs/glshim
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 13:01   #317
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

OK tried the new glshim:
pi@raspberrypi ~ $ echo $LD_LIBRARY_PATH
/usr/local/lib

Path set ok.

pi@raspberrypi ~ $ ls /usr/local/lib/libGL*
/usr/local/lib/libGL.so /usr/local/lib/libGL.so.1 /usr/local/lib/libGLU.so /usr/local/lib/libGLU.so.1
pi@raspberrypi ~ $

ouptput of glxinfo

name of display: :0
libGL: built on Aug 2 2014 19:38:48
Unable to create EGL display.
ERROR: EGL Error detected: EGL_BAD_DISPLAY (0x3008)
ERROR: EGL Error detected: EGL_BAD_DISPLAY (0x3008)

libGL: unknown attrib 3
libGL: unknown attrib 35
libGL: unknown attrib 3
libGL: unknown attrib 35
2 GLX Visuals
visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
----------------------------------------------------------------------------
libGL: unknown attrib 3
libGL: unknown attrib 35
0x021 24 tc 1 16 0 r y . 5 6 5 8 . . 0 16 0 0 0 0 0 0 0 None
libGL: unknown attrib 3
libGL: unknown attrib 35
0x041 32 tc 1 16 0 r y . 5 6 5 8 . . 0 16 0 0 0 0 0 0 0 None

1 GLXFBConfigs:
visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
----------------------------------------------------------------------------
libGL: unknown attrib 34
libGL: unknown attrib 3
libGL: unknown attrib 35
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 32
0x001 24 sg 1 16 0 rc y . 5 6 5 8 . . 0 16 0 0 0 0 0 0 0 None

pi@raspberrypi ~ $

OpenGL does not work in Raspbian! Do you have any other suggestions. If you have it working on the pi then we just need to replicate that!

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 14:43   #318
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Try this:

https://github.com/nfz/RPIGears
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 15:02   #319
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
Yep works a treat, full screen gears, awesome. I did this:

pi@raspberrypi ~ $ git clone https://github.com/nfz/RPIGears
Cloning into 'RPIGears'...
remote: Counting objects: 84, done.
remote: Total 84 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (84/84), done.
pi@raspberrypi ~ $ cd RPI*
pi@raspberrypi ~/RPIGears $ ls -lash
total 620K
4.0K drwxr-xr-x 3 pi pi 4.0K Aug 2 21:59 .
4.0K drwxr-xr-x 27 pi pi 4.0K Aug 2 21:59 ..
4.0K drwxr-xr-x 8 pi pi 4.0K Aug 2 21:59 .git
0 -rw-r--r-- 1 pi pi 0 Aug 2 21:59 LICENSE
4.0K -rw-r--r-- 1 pi pi 1.1K Aug 2 21:59 Makefile
4.0K -rw-r--r-- 1 pi pi 971 Aug 2 21:59 README.md
40K -rw-r--r-- 1 pi pi 39K Aug 2 21:59 RPIGears.c
560K -rw-r--r-- 1 pi pi 558K Aug 2 21:59 RPi_Logo256.c
pi@raspberrypi ~/RPIGears $ make
cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -g -c RPIGears.c -o RPIGears.o -Wno-deprecated-declarations
cc -o RPIGears.bin -Wl,--whole-archive RPIGears.o -L/opt/vc/lib/ -lGLESv2 -lEGL -lbcm_host -Wl,--no-whole-archive -rdynamic
rm RPIGears.o
pi@raspberrypi ~/RPIGears $ ls -lash
total 872K
4.0K drwxr-xr-x 3 pi pi 4.0K Aug 2 22:00 .
4.0K drwxr-xr-x 27 pi pi 4.0K Aug 2 21:59 ..
4.0K drwxr-xr-x 8 pi pi 4.0K Aug 2 21:59 .git
0 -rw-r--r-- 1 pi pi 0 Aug 2 21:59 LICENSE
4.0K -rw-r--r-- 1 pi pi 1.1K Aug 2 21:59 Makefile
4.0K -rw-r--r-- 1 pi pi 971 Aug 2 21:59 README.md
252K -rwxr-xr-x 1 pi pi 250K Aug 2 22:00 RPIGears.bin
40K -rw-r--r-- 1 pi pi 39K Aug 2 21:59 RPIGears.c
560K -rw-r--r-- 1 pi pi 558K Aug 2 21:59 RPi_Logo256.c
pi@raspberrypi ~/RPIGears $

Then ran it in a terminal session. Worked perfectly, very smooth graphics.

How does this help us?

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 15:11   #320
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

I'll try on my raspberry after I sleep, I just got an lcd for it.

If I get the same result as you, then I must hack glshim some more, but I recall it worked for me via vnc, and I ran glxgears without your errors.
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 15:16   #321
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

OK many thanks for your assistance. I think what you are doing is awesome. If we can get OpenCPN OpenGL working it should be really usable and a lot of others will benefit. I tested GPS/AIS Auto pilot/Repeater etc. yesterday on the boat. All worked fine.

I will do some more reading on the cross compiling thing, but I don't mind waiting for it to compile if the outcome is a usable marine Pi


Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 21:04   #322
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

The display I have is for a digital car rear view. So it is svideo, but the plug is female same as the pi. I have no cable to attach.
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 01:25   #323
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

wow I'm seeing ads for "3d game with the prettiest girls warning: adapted from japanese manga" on cruisers forum.


Anyway, I also got a 7 inch hdmi monitor so I tried on my pi, and at first had the same problems about bad display etc... and but the RPIgears worked, I was running x as root.

Then somehow the usb port that powers the wifi dongle failed, I hope I didn't burn it out.. switch to the other port...

Then I booted again, but this time, run "sudo lightdm" instead of startx and connect (via x11vnc) and login etc.. and now somehow it worked, and opencpn runs with hardware acceleration. This must be a permissions problem.

It isn't really fast, but 3-4 times faster than without opengl and much faster (20 times or so) switching raster charts etc.. But I think it's getting slowed down significantly because of one major glitch (which basically makes it not usable) Every mouse or keyboard event, where it refreshes the display, it first displays whatever would be shown under x (blank window) then displays the opengl display. I imagine without this it would have relatively smooth graphics.

I can think of 3 possible solutions.

Hack opencpn and possibly wxwidgets to avoid this refresh. It may not actually be possible depending on what x does. I don't really like this because it only has relevance for raspberry pi, and not many people care.

Run opencpn under wayland (reportedly it works) which would allow full opengl acceleration without using x at all, but gtk3 is supported so it can still display the widgets for toolbar, setup etc... This requires compiling gtk3, and then wxwidgets for this, and maybe it works? This may be an improvement because not using x will save ram and resources on low spec hardware.

Finally, there is an option that will allow opencpn to run directly on linux framebuffer (as well as a lot of other platforms) but it just isn't ready yet. May take a few weeks, and even then will have ui bugs.
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 05:38   #324
Registered User

Join Date: Aug 2014
Posts: 7
Re: OpenCPN Runs on Embedded ARM

Hello,
Can somebody tell me his frame per second for glxgears with opengl on Cubietruck ?
Activating opengl on my cubietruck increased the performance from 45 fps to 60 fps.... and everything seems OK with glxinfo.
Thank you !
BlackNav is offline   Reply With Quote
Old 03-08-2014, 07:20   #325
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

depending on the window manager, you are capped at 60 frames per second since it's how fast the lcd updates anyway, so the in fact your speedup is not 25% but more like 1000% and for opencpn, you are rarely going to hit 60 frames a second on one of these arms (maybe if the screen is a tiny resolution)

Anyway, I just hacked opencpn.. and oh yeah! it's working on the pi with acceleration and no flickering. I was excited with 4-5 frames a second, butnow it's doing 13+ once I plugged a keyboard in rather than controlling it over wifi through vnc (that is really slow)

My resolution is 1280x720. I'm getting 3.5 frames a second without opengl, and 13 frames per second with opengl. This is in overzoomed, zooming out the frame rate is about 1 frame a second without opengl, but still 13 with opengl.

It isn't completely stable, I have crashed a few times.

When I write the manual mipmapping support for opencpn, it will speed up all platforms and reduce video memory use, but the improvement is much greater for opengles because we are currently forced to load full all levels of mipmaps.

Wow, it's actually quite fast. I would say faster than opencpn ran on my atom netbook a year ago before the optimizations.

Also, must run with -fullscreen command line.

It's a shame the hardware panning isn't working, it is supported, just not properly implemented for this hardware by opencpn. This can help a lot for vector charts and should be fixed.

I'm testing with only raster charts using the cache which is much faster. Without the cache I managed to crash the pi as it attempted to generate the cache on the fly, so it's essential to do it before. It's slow! Would take 3 days to build the cache for all the US BSB charts.

The toolbar is completely invisible (although works) as well as the mouse pointer, so that isn't really so convenient. Of course if I wanted to, I could render the toolbar and mouse pointer using opengl, as well as the chart bar, and make a certain key toggle opengl. It's possible we want the screen to not render charts at all (say only tracks without opengl) for memory and usability reasons.

I'm not sure it's worth the effort. Might be better to try wayland, though I doubt the support is any better there. The mali drivers on the faster arms are just much better suited for us because they can handle multiple windows at the same time, but the pi is still interesting. I wonder if there are other systems people use with with similar drivers (broadcom).
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 15:52   #326
MAd
Registered User

Join Date: May 2014
Location: Germany
Boat: Vindoe 50SL, 35feet
Posts: 18
OpenCPN Beta 3.3.1931 on ODROID

Sean,
I've compiled the latest Beta (3.3.1931) on my ODROID and it's even faster than before (1080p with OpenGL), great! There are some error messages in the terminal window re OpenGL, are you aware of them (don't know if you've already installed the ODROD)?

Re usage of RPi for OpenCPN: I would strongly recommend to use at least a CB or CT, or even better an ODROID if you want to use larger displays with 720p or 1080p. The RPi is great stuff but IMO too slow for OpenCPN.

Regards,
Martin
MAd is offline   Reply With Quote
Old 04-08-2014, 00:05   #327
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Beta 3.3.1931 on ODROID

Quote:
Originally Posted by MAd View Post
Sean,
I've compiled the latest Beta (3.3.1931) on my ODROID and it's even faster than before (1080p with OpenGL), great! There are some error messages in the terminal window re OpenGL, are you aware of them (don't know if you've already installed the ODROD)?
I have hdmi->mini hdmi adapter. But nothing uses mini hdmi. The odroid uses micro hdmi so I have no way to connect a screen yet.
Quote:
Re usage of RPi for OpenCPN: I would strongly recommend to use at least a CB or CT, or even better an ODROID if you want to use larger displays with 720p or 1080p. The RPi is great stuff but IMO too slow for OpenCPN.

Regards,
Martin
I am getting 12-13 frames per second at 1280x800 resolution from the raspberry. It is certainly a lot slower than the other arm boards, but completely usable with opengl, smooth zooming is working. A bit of work needs to be done on opencpn to improve the way it behaves.

The cubie truck would be more than twice as fast, and odroid, I have no idea but I'm sure it's faster than most mac books. Anything with mali graphics drivers will work well.


Also, do _not_ need to rename libGL.so.1 to libGL.so... it just needs to go in the right place which is /usr/lib/arm-* not /usr/local/lib, or just set LD_LIBRARY_PATH.
seandepagnier is offline   Reply With Quote
Old 04-08-2014, 00:08   #328
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Beta 3.3.1931 on ODROID

Quote:
Originally Posted by MAd View Post
There are some error messages in the terminal window re OpenGL, are you aware of them (don't know if you've already installed the ODROD)?
Are they glGetError = 0x500 messages?

I get tons of these on the raspberry, so many I have to redirect them to /dev/null or it slightly slows the program. I need to look into this one.
seandepagnier is offline   Reply With Quote
Old 04-08-2014, 07:10   #329
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Beta 3.3.1931 on ODROID

Quote:
Originally Posted by boat_alexandra View Post
I have hdmi->mini hdmi adapter. But nothing uses mini hdmi. The odroid uses micro hdmi so I have no way to connect a screen yet.


I am getting 12-13 frames per second at 1280x800 resolution from the raspberry. It is certainly a lot slower than the other arm boards, but completely usable with opengl, smooth zooming is working. A bit of work needs to be done on opencpn to improve the way it behaves.

The cubie truck would be more than twice as fast, and odroid, I have no idea but I'm sure it's faster than most mac books. Anything with mali graphics drivers will work well.


Also, do _not_ need to rename libGL.so.1 to libGL.so... it just needs to go in the right place which is /usr/lib/arm-* not /usr/local/lib, or just set LD_LIBRARY_PATH.
Hello again,

Sorry for the delay in posting, I went sailing

Just read through, it seems you have OpenGL working after a fashion. In this in lightdm? I also noted you needed to move the libGL to /usr/lib/arm-*

I have the following libGL* files in /usr/lib/arm-linux-gnueabihf already:

libGL.so
libGL.so.1
libGL.so.1.2
libGLU.a
libGLU.so
libGLU.so.1
libGLU.so.1.3.08005

Do I need to copy my compiled ones over these?

Do you intent to push the hacks to OpenCPN to the GIT?

I am sure that there are a lot of interested pi users that would love to have a useable OpenCPN particularly with the new B+ with 4 USB ports.

Cheers
Spart
sparticle is offline   Reply With Quote
Old 04-08-2014, 08:29   #330
Registered User
 
Wrong's Avatar

Join Date: Jul 2013
Posts: 1,702
Re: OpenCPN Beta 3.3.1931 on ODROID

Sort of out of my league here since I'm an android tablet fan, running OpenCPN in a chroot linux environment. But, regarding the build error reporting OpenGL as not found, I experienced that for some strange reason exporting the library path didn't work. So, I just edited the /build/CmakeCache.txt file like so.

Edit these two lines that are reported as 'NOT FOUND' as below:

//Path to a library.
OPENGL_gl_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/mesa/libGL.so

//Path to a library.
OPENGL_glu_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/libGLU.so.1

Then, saved the file. Alternatively, but more cumbersome is to use the '-i' switch with your cmake command...

Quote:
Originally Posted by sparticle View Post
Hello again,

Sorry for the delay in posting, I went sailing

Just read through, it seems you have OpenGL working after a fashion. In this in lightdm? I also noted you needed to move the libGL to /usr/lib/arm-*

I have the following libGL* files in /usr/lib/arm-linux-gnueabihf already:

libGL.so
libGL.so.1
libGL.so.1.2
libGLU.a
libGLU.so
libGLU.so.1
libGLU.so.1.3.08005

Do I need to copy my compiled ones over these?

Do you intent to push the hacks to OpenCPN to the GIT?

I am sure that there are a lot of interested pi users that would love to have a useable OpenCPN particularly with the new B+ with 4 USB ports.

Cheers
Spart
Wrong is offline   Reply With Quote
Reply

Tags
opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 15:32
OpenCPN Version 2.5 Release bdbcat OpenCPN 86 02-09-2011 18:14
OpenCPN Stops Running BobLarkin OpenCPN 2 30-08-2011 23:38
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 05:45.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.