Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 05-04-2018, 01:32   #1
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
OpenGL dooes Not work

I notice in a lot of the OpenCPN threads you advise to use OpenGL on OpenCPN. I have found that it causes a few problems with charts created by GE2KAP and I advise not to use it.

Here is an example of one problem. I create a chart sasplanet.kap and go to OpenCPN (V4.8.2), scan for new charts, go to the lat/lon of the chart and all it shows is the chart outline if OpenGL is on (first attachment). If I turn off OpenGL it appears (second attachment). If I turn OpenGL on again the chart disappears again. The OpenCPN log does not show any error. Is this a bug in OpenGL:
Attached Thumbnails
Click image for larger version

Name:	OpenGL.jpg
Views:	205
Size:	142.7 KB
ID:	167648   Click image for larger version

Name:	No_OpenGL.jpg
Views:	216
Size:	262.8 KB
ID:	167649  

Attached Files
File Type: doc OpenCPN.log.doc (151.9 KB, 20 views)
__________________

__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 05-04-2018, 02:24   #2
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
Re: OpenGL dooes Not work

The Problem seems to revolve around using the same name for the chart. For example I create a chart called Bahia Matanzas_1.Kap using GE data and then go to OpenCPN, scan for new charts, and with OpenGL on its shows correctly (first attachment). I then recreate the chart with same name but this time the source is Navionics data, scan for new charts, and it shows the same old chart with the GE data (second attachment). If I turn OpenGL off it shows the correct new data (third attachmnent). If I turn OpenGL on it shows the old data (fourth attachment).

So the problem seems that with OpenGL on it does not know the chart has changed.
Attached Thumbnails
Click image for larger version

Name:	Bahia_Matanza_GE_OpenGL.jpg
Views:	145
Size:	204.6 KB
ID:	167653   Click image for larger version

Name:	Bahia_Matanza_Navionics_OpenGL.jpg
Views:	141
Size:	193.3 KB
ID:	167654  

Click image for larger version

Name:	Bahia_Matanza_Navionics_NO_OpenGL.jpg
Views:	143
Size:	262.6 KB
ID:	167655   Click image for larger version

Name:	Bahia_Matanza_Navionics_Turn_OpenGL_ON.jpg
Views:	145
Size:	194.2 KB
ID:	167656  

__________________

__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 05-04-2018, 02:30   #3
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
Re: OpenGL dooes Not work

Oops just discovered how to get OpenGL to show the correct chart: Press F5

Problem solved.

Now the Help says F5 is:
F5 toggle Daylight, Dusk & Night mode, if built into the Chart ( “C”, Ctrl+C, Ctrl+G)

Nothing about being a refresh too.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 05-04-2018, 04:36   #4
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: charleston
Boat: bristol 27
Posts: 3,608
Re: OpenGL dooes Not work

I think the texture hash collides with identical filenames. Changing the color scheme forces a refresh.
boat_alexandra is offline   Reply With Quote
Old 05-04-2018, 11:19   #5
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Pacific - Mexico
Boat: Sailboat
Posts: 1,294
Re: OpenGL dooes Not work

Possibly related: I reported this bug with filename collisions last August on github, then was asked to move it to flyspray, nothing heard since..

phiggins, sean, any others using homemade charts with possible duplicate filenames, you may vote up the bug on flyspray to get it some attention.

GITHUB thread: https://github.com/OpenCPN/OpenCPN/issues/868
Flyspray ID: #2261
https://opencpn.org/flyspray/index.p...ported%5B0%5D=

Cheers

Dirk
LeaseOnLife is offline   Reply With Quote
Old 06-04-2018, 00:49   #6
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
Re: OpenGL dooes Not work

Dirk, I read the flyspray and it doesn't sound like this problem. My charts are in the same directory and the problem only happens with OpenGL.

I'm not sure if pressing F5 is really the answer to this problem. Can anyone on the OpenCPN team comment, Dave?
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 06-04-2018, 02:38   #7
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: OpenGL dooes Not work

Quote:
Originally Posted by phiggins View Post
Dirk, I read the flyspray and it doesn't sound like this problem. My charts are in the same directory and the problem only happens with OpenGL.

I'm not sure if pressing F5 is really the answer to this problem. Can anyone on the OpenCPN team comment, Dave?
Yes, the GL texture cache is not being flushed during chart database update when you overwrite a chart already displayed while OpenCPN is running. Resolved the latest after a restart of OpenCPN for me. It is a bug, IMO very minor. At least for me it is definitely not even remotely a reason to recommend anybody not to use OpenGL.

Pavel
nohal is offline   Reply With Quote
Old 06-04-2018, 03:44   #8
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
Re: OpenGL dooes Not work

Pavel, it may be a very minor bug to you but I have spent countless hours trying to figure out why a chart created by GE2KAP would not show on OpenCPN. Only after experimenting with various settings did I discover it was OpenGL causing the problem. When it displayed properly with OpenGL turned off I advised GE2KAP users not to use it. Now that I know I can refresh the display with F5 I have advised the GE2KAP users to use it but beware it may not be displaying the correct chart data. Restarting OpenCPN every time you create a chart is not a practical option.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 06-04-2018, 03:49   #9
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: OpenGL dooes Not work

Paul...
Software has bugs. That is normal.
As your use case is somewhat special you sure may consider this a major issue. Anyway, it is trivial to fix.

Pavel
nohal is offline   Reply With Quote
Old 06-04-2018, 03:57   #10
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,574
Send a message via Skype™ to phiggins
Re: OpenGL dooes Not work

Quote:
Software has bugs. That is normal.
Tell me about it.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 06-04-2018, 04:16   #11
Registered User

Join Date: May 2014
Location: USA
Boat: 41' yawl
Posts: 922
OpenGL dooes Not work

Quote:
Originally Posted by nohal View Post
Paul...
Software has bugs. That is normal.
As your use case is somewhat special you sure may consider this a major issue. Anyway, it is trivial to fix.

Pavel



Software written by script kiddies has bugs. That is normal. Software written by people who just start typing until their feature exists has bugs. That is normal.

Bugs in something like OpenCPN are the rule, rather than the exception, because its the equivalent of adult fingerpainting class, there is barely any architecture or strategy, there are just a bunch of people getting their hands dirty with no wrong answers.

I'm not criticizing the open source community as a whole, just the poorly managed ones, where people don't begin their work by first identifying the necessary components and how and what they'll communicate with each other (aka 'software engineering').

If OpenCPN has matured since I last tried it about 2 years ago, then I apologize for out of date criticism.

And there is something amusing about someone complaining about software quality in a thread they titled 'OpenGL dooes Not work'.
chris95040 is offline   Reply With Quote
Old 06-04-2018, 05:43   #12
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 3,780
Re: OpenGL dooes Not work

Quote:
Originally Posted by chris95040 View Post
If OpenCPN has matured since I last tried it about 2 years ago, then I apologize for out of date criticism.


Champion, there is always place for contributors....
Even chasing bugs or testing
bcn is offline   Reply With Quote
Old 06-04-2018, 20:14   #13
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: charleston
Boat: bristol 27
Posts: 3,608
Re: OpenGL dooes Not work

Quote:
Originally Posted by phiggins View Post
Pavel, it may be a very minor bug to you but I have spent countless hours trying to figure out why a chart created by GE2KAP would not show on OpenCPN.
Sorry for this.

Basically the texture hash is computed based on filename. It should be changed to use the file path instead, or possibly something else, like a hash for the chart header, but maybe that is identical too. There is the possibility of the user moving, or mounting the data in a different location, but the performance penalty here is probably acceptable.

Despite this, the chart should still show, rebuilding the cache each time with a performance penalty switching between them, especially if both charts are shown at the same time which is probably impossible anyway.

see this really as two separate bugs.
boat_alexandra is offline   Reply With Quote
Old 06-04-2018, 20:28   #14
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: charleston
Boat: bristol 27
Posts: 3,608
Re: OpenGL dooes Not work

Quote:
Originally Posted by chris95040 View Post
I'm not criticizing the open source community as a whole, just the poorly managed ones, where people don't begin their work by first identifying the necessary components and how and what they'll communicate with each other (aka 'software engineering').
Please tell us of which free software you contribute so we might learn something.
boat_alexandra is offline   Reply With Quote
Old 07-04-2018, 14:26   #15
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: OpenGL dooes Not work

Paul...
Unless your real usage is even more abusive than my tests, it is now fixed in master branch.

Pavel
__________________

nohal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
CMakeLists.txt does not find OpenGL or OpenGLES svkatielee OpenCPN 4 17-06-2016 11:39
Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work? Gunnar1 OpenCPN 53 16-06-2015 02:10
OpenGL for OpenCPN bdbcat OpenCPN 72 15-11-2011 01:17
opengl Support boat_alexandra OpenCPN 2 17-07-2011 21:17
Wanted For Free: OpenCPN + WIN CE/OpenGL-ES CaptGreg Classifieds Archive 1 06-09-2010 19:46

Advertise Here


All times are GMT -7. The time now is 02:09.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.