Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 25-09-2011, 15:56   #31
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: OpenGL for OpenCPN

Dave

Single chart mode works!
I was actually on Course Up, but changing between Course Up and North Up, leads to no visual changes on the screen.

....
Funny thing, once I got it going it seems to handle quilting mode OK. I can now toggle F9 with quilting on, and it still works. Also, a lot more output from your printf in the terminal window.

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 26-09-2011, 04:35   #32
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: OpenGL for OpenCPN

Dave
Testing 2.6.925 in non gl mode. Passed phiggins AIS simulator.
The only thing I have found so far is the rendering of certain Z and A level CM93 charts where land is "sea colored". See dump below of Java. The charts are OK from B level and larger scale.
Click image for larger version

Name:	mine6.png
Views:	114
Size:	76.5 KB
ID:	32076

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 26-09-2011, 22:02   #33
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: OpenGL for OpenCPN

Hi there, folks!

CALLING ALL WINDOWS DEVELOPERS:

We seriously need a Windows OpenGL savvy developer to dig into this alpha release of OCPN to find and correct some simple display refresh issues.

My assorted Win boxes do, well, assorted things. None work correctly with OCPN ogl alpha, even though they "seem" to play ogl games OK.

So it must be that OCPN is not using ogl correctly.

Any assistance gratefully accepted. Step right up here and get your name on the 2.7 Release Author's page

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 03-10-2011, 09:19   #34
Registered User

Join Date: Dec 2010
Posts: 7
Re: OpenGL for OpenCPN

Hi Dave,

Two tests here: one on my laptop, and one on my beagleboard.

Test 1

I used raster charts.
Turning on OpenGL does not "feel" much different, apart from the visible interpolation when magnifying the charts. Htop indicated a slightly lower CPU usage when using OpenGL. Switching back to non-OpenGL mode seemed to freeze OpenCPN.

a. Ubuntu 11.04 on an Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GH.
b. Quadro FX 3600M/PCI/SSE2 from NVIDIA Corporation. OpenGL version 3.3.0 NVIDIA 270.41.06 is supported
c. 3800 FPS
d. I did run into the bug described here. I applied the fix I mentioned and it passed compilation.
e.


Test 2

The beagleboard has an SGX chip supporting OpenGLES 2.0 only, not the plain vanilla OpenGL. I have support for OGLES via the SGX drivers, and for OGL via the Mesa implementation. I tested OGLES with the demos shipped with the SDK, and OGL with glxgears. All worked "fine" (notwithstanding a few glitches).

On this one, turning on OpenGL made OpenCPN segfault (stacktrace below).

a. Ubuntu 11.04 on a Beagleboard xM rev A
b. PowerVR SGX530 (but I expect OpenCPN tried to use Mesa)
c. 35 FPS, but I expect this is Mesa performance. I'll try to see if I can get an OGLES glxgears test or similar.
d. I got the same GTK2 compile problem as above. Same fix applied.
e. Well, no OpenGL screenshot, but that being said, OpenCPN does work in plain mode:


GDB backtrace when switching to OpenGL:

0x402279d8 in wxWindow::GTKGetWindow(wxArrayGdkWindows&) const ()
from /usr/lib/libwx_gtk2u_core-2.8.so.0
(gdb) bt
#0 0x402279d8 in wxWindow::GTKGetWindow(wxArrayGdkWindows&) const ()
from /usr/lib/libwx_gtk2u_core-2.8.so.0
#1 0x4022ac74 in wxWindow::GTKUpdateCursor() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#2 0x4022acfa in wxWindow::SetCursor(wxCursor const&) ()
from /usr/lib/libwx_gtk2u_core-2.8.so.0
#3 0x001015ea in ChartCanvas::SetCursor (this=0x4a34d0, c=...)
at /home/antoine/opencpn-dev/src/chcanv.cpp:9907
#4 0x000eab72 in ChartCanvas::ChartCanvas (this=0x4a34d0, frame=0x422bd8)
at /home/antoine/opencpn-dev/src/chcanv.cpp:3232
#5 0x000a1558 in MyApp::OnInit (this=0x338290)
at /home/antoine/opencpn-dev/src/chart1.cpp:2490
#6 0x000bd56e in wxAppConsole::CallOnInit (this=0x338290)
at /usr/include/wx-2.8/wx/app.h:76
#7 0x4008f2c2 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#8 0x0009f8f2 in main (argc=1, argv=0xbefff404)
at /home/antoine/opencpn-dev/src/chart1.cpp:1599


I'm an OpenGL developer, so I might be able to give a hand on this if that's useful. I'm especially keen on getting OpenCPN using the beagleboard's OGLES capabilities, I think it can be much more responsive than it is now. It's working OK in plain mode, but the UI is a bit sluggish, especially as the number of charts loaded increase.

Cheers,
A.
Attached Thumbnails
Click image for larger version

Name:	Screenshot001.png
Views:	673
Size:	69.1 KB
ID:	32295   Click image for larger version

Name:	Screenshot002.png
Views:	733
Size:	79.8 KB
ID:	32296  

__________________
antoche is offline   Reply With Quote
Old 03-10-2011, 10:01   #35
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: OpenGL for OpenCPN

antoche....

Thanks for the feedback.

I too want to get ocpn going on openglES. This will be useful for Android and IOS, for example....

I guess your hi-spec machine will not be much different with opengl, until we come to vector charts, real soon now....

Meanwhile, it looks like the Beagleboard fault relates to custom OCPN cursors.

First step would be to stub out the cursor setting code in chcanv.cpp, (e.g. ChartCanvas::SetCursor()), recompile, and see what happens. After that, just tackle each fault as it appears, removing (temporarily) the questionable methods. Eventually, it will work, with some reduced functionality. Then we build it back up, fixing as we go.

I would be great to have some more ogl experience looking at this code. Glad to have you aboard.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 04-10-2011, 05:53   #36
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: OpenGL for OpenCPN

Hi
I tried to compile the new 2.6.925 on windows , but I crashed on the first step : unable to built the project with an error in the shot attached
many thanks
Jean Pierre
Attached Thumbnails
Click image for larger version

Name:	CmakeError.jpg
Views:	126
Size:	132.5 KB
ID:	32339  
__________________
Ptizef is offline   Reply With Quote
Old 04-10-2011, 21:35   #37
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: OpenGL for OpenCPN

Hello Team....

Latest iteration of OpenGL alpha code is available on github.

This one is called 2.6.1004

git://github.com/bdbcat/OpenCPN.git

What's new:

1. Initial vector chart (cm92 and S57 ENC) implemented.

2. Windows binary version available.

For Windows:

Download zip file from:
opencpn261004.7z - 4shared.com - online file sharing and storage - download

To install:

Unzip the downloaded file into a directory OTHER THAN your normal OpenCPN run directory. Maybe use something like C:/Program Files/OpenCPN/OCPNGL...

You will see in the unzipped folder the new opencpn.exe executable (2.6.1004), as well as a set of .dlls which enable OpenGL support for wxWidgets. After unzipping, run OpenCPN from this folder as normal. It will use your current config files and chart setups. The config files are compatible, so that your existing OCPN installation will not be corrupted.

Enable OpenGL support in Toolbox->Settings.



Please understand that the objective, as before, of this alpha testing is to validate basic compatibility of the programming model and available system libraries and graphics hardware. Some things are not yet implemented, especially with vector charts. Some objects will not be rendered correctly, if at all.

It is also important to show that operation in normal (i.e. non-opengl) mode is not different from the existing 2.5 release of OCPN.

I'm using 1004 in opengl mode for daily navigation now, trying to stress test it as conditions allow. So far, so good.

Let me know if there are download problems, and all feedback in exquisite detail is appreciated.

Good luck
Dave
__________________
bdbcat is offline   Reply With Quote
Old 05-10-2011, 05:19   #38
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 300
Re: OpenGL for OpenCPN

Hoi Dave,
As you already mentioned cm93 is rendering partly.
I had 2 instances of OCPN running and noticed a very considerable difference in cpu load for the toolbars. Using OpenGL the load is 5-6 times higher ??

I'm using gentoo on a Atom computer with 4G mem.

grjes
Dirk
Attached Thumbnails
Click image for larger version

Name:	OCPN-OCPN-GL1.jpg
Views:	125
Size:	409.7 KB
ID:	32375  
__________________
rooiedirk is offline   Reply With Quote
Old 05-10-2011, 05:31   #39
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: OpenGL for OpenCPN

Hi Dave

A very quick first test on 2.6.1004 wjth Windows Vista

1) once opengl has been activated , If I tried to de-activate it , I get a crash when I close the toolbox
2) If I open the toolbox with opengl activated, click one time anywhere in it then close it then now if I try to drag , the screen is frozen and a small window round the cursor is opened and the map is draged in this very small windows . A right click unfreezes the screen (see shot attached )
3) when opengl is activated , absolutely no text are displayed on the CM93 chart
4) the 'smooth zooming' option seams to work fine with rasters but not with CM93 . For this last case , the calculation time seams to be to long , the 'busy cursor' icon is shown and sometime the zoom goes to the wrong direction

Jean Pierre
Attached Thumbnails
Click image for larger version

Name:	opengl1.jpg
Views:	106
Size:	198.0 KB
ID:	32376  
__________________
Ptizef is offline   Reply With Quote
Old 05-10-2011, 06:17   #40
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: OpenGL for OpenCPN

I get the same behaviour as in my point 2 when clicking alternatively on the chart bars
Jean Pierre
__________________
Ptizef is offline   Reply With Quote
Old 05-10-2011, 06:33   #41
Registered User

Join Date: Jul 2010
Posts: 51
Re: OpenGL for OpenCPN

Tested the application using CM93 charts. After playing around and restaring the application it wont start again. OpenCPN seems to be using OpenGL in some unexpected way:

Problem Event Name: APPCRASH
Application Name: opencpn.exe
Application Version: 2.6.1004.0
Application Timestamp: 4e8bc1c5
Fault Module Name: atioglxx.dll
Fault Module Version: 6.14.10.8545
Fault Module Timestamp: 4b738e57
Exception Code: c0000005
Exception Offset: 0007afae
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 1053
Additional Information 1: 9c12
Additional Information 2: eebbdb0c8a52c5ef97097898e9dbe052
Additional Information 3: 0682
Additional Information 4: 453e9209d93418ee725252c365d3552d
__________________
stensmo is offline   Reply With Quote
Old 05-10-2011, 11:00   #42
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: OpenGL for OpenCPN

Dave

Testing Ubuntu 11.10 + ATI card.
Vector charts works well, with a few issues as you hinted at.
Found a problem when zooming out on S57 ENC. The dump below illustrates the problem. The charts are OK in normal scale.
Click image for larger version

Name:	GL1004.png
Views:	98
Size:	104.8 KB
ID:	32389
I found no undue workload with the GL version, but there is a larger memory footprint.
Click image for larger version

Name:	GL1005.png
Views:	104
Size:	286.8 KB
ID:	32390

I also tested WinXP with a mixed result.
First CM93 worked beautifully, similar performance as on Linux. The XP box also has a quite good ATI card. Trying raster charts with cm93 running was painfully slow, almost hung.
I then got stuck on latitude 123 S with cm93 .....and could not recover.
On restart cm93 did not load. The reason for this seems to be that the application was looking for s57data, wvsdata etc, in the same directory as the binary. Trying raster charts in ogl, now led to crashes with no useful messages, but perhaps related to the same problem.

Thomas
__________________
cagney is offline   Reply With Quote
Old 05-10-2011, 11:19   #43
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: OpenGL for OpenCPN

not what you want,I guess-I have a real graphics card-I'll try it on a laptop with onboardshared mem type soon.
on XPsp_1(a T42 IBM with a graphics card)..similar to Thomas' Rasters are pretty slow and bluurier too but CM93 is pretty good although I lose detail...soundings and lights different etc.No crashes yet,though restart with GL is fine....
here's something odd...I changed the name of the exe to opencpnGL.exe and I'd swear it made a difference...?maybe it's just the restarts have helped...can run both at once and they both are about the same speedwise.


Click image for larger version

Name:	Clipboard01.jpg
Views:	115
Size:	167.2 KB
ID:	32393

edit;no problem restarting with CM93 on deck.
__________________
HappySeagull is offline   Reply With Quote
Old 05-10-2011, 16:00   #44
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: OpenGL for OpenCPN

...that's very clever!Now I have two separate config folders in so each version runs perfectly separate!...I guess you are killing two birds with one stone!


Click image for larger version

Name:	Clipboard01.jpg
Views:	96
Size:	21.0 KB
ID:	32402
__________________
HappySeagull is offline   Reply With Quote
Old 06-10-2011, 08:05   #45
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: OpenGL for OpenCPN

...OK.Now on a Dell-shared vidmem.
Works PERFECTLY.with raster and vector
The dell has no install anywhere of Opencpn(I was testing ahomemade portable)
so I just started up the O2.61 by herself.Worked but no CM93.So found the files she wanted and dragged em into the folder.Good-oh!
Works great.Fast.Gps ok.
The power zoom is a lttle scary

Click image for larger version

Name:	testO261.jpg
Views:	104
Size:	103.4 KB
ID:	32415

..I think I get it.I'm pretending to be a cellphone ...
__________________

__________________
HappySeagull is offline   Reply With Quote
Reply

Tags
opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
opengl Support boat_alexandra OpenCPN 2 17-07-2011 22:17



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:32.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.