Error in ImageLayer after building on Mac?

classic Classic list List threaded Threaded
5 messages Options
davenquinn davenquinn
Reply | Threaded
Open this post in threaded view
|

Error in ImageLayer after building on Mac?

Hello all,

I am trying to create a basic Cocoa OSGEarth application on Mac OS 10.14.2. I've built OSGEarth successfully (master branch) against OpenSceneGraph master. I've also tried (successfully) to build with OSGEarth 2.10 and OpenSceneGraph 3.6.2. GDAL, curl, and other dependencies are installed and linked.

When I open an Earth file (any earth file) in either my application or `osgearth_viewer`, neither images nor text glyphs are displayed. Basic forms show up fine, and interaction works as expected. A screenshot is shown below; the globe should be covered with Earth imagery and the controls should be labeled.

Screenshot of application

When I run the `osgEarth_tests` application, several errors are encountered with the Cache and ImageLayer creation. Test output is shown at the end of the post.

Does anybody have an idea of what may be happening? It seems like an error in building or linking that persists no matter what frontend application code is used to wrap OSGEarth. Any CMAKE variables that I can try, or a version pairing of OSG/OSGEarth that is known to be free of this type of bug?

Regards,
Daven

> osgEarth_tests

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
osgEarth_tests is a Catch v1.6.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
Cache
-------------------------------------------------------------------------------
/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/CacheTests.cpp:30
...............................................................................

/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/CacheTests.cpp:34: FAILED:
  REQUIRE( cache.valid() )
with expansion:
  false

-------------------------------------------------------------------------------
ImageLayers can be created from TileSourceOptions
-------------------------------------------------------------------------------
/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/ImageLayerTests.cpp:33
...............................................................................

/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/ImageLayerTests.cpp:40: FAILED:
  REQUIRE( status.isOK() )
with expansion:
  false

-------------------------------------------------------------------------------
Attribution works
-------------------------------------------------------------------------------
/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/ImageLayerTests.cpp:61
...............................................................................

/Users/Daven/Projects/Map-Viewer/osgearth/src/tests/osgEarth_tests/ImageLayerTests.cpp:73: FAILED:
  REQUIRE( status.isOK() )
with expansion:
  false

===============================================================================
test cases:  15 |  12 passed | 3 failed
assertions: 140 | 137 passed | 3 failed
Postdoctoral Researcher
University of Wisconsin – Madison
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Error in ImageLayer after building on Mac?

Daven,
Will you please run this and post the output:

osgearth_version --caps
Glenn Waldron / Pelican Mapping
davenquinn davenquinn
Reply | Threaded
Open this post in threaded view
|

Re: Error in ImageLayer after building on Mac?

Here's the result:

osgEarth Library 2.10.0

[osgEarth]  [Capabilities] osgEarth Version: 2.10.0
[osgEarth]  [Capabilities] Detected hardware capabilities:
[osgEarth]  [Capabilities]   Vendor = ATI Technologies Inc.
[osgEarth]  [Capabilities]   Renderer = AMD Radeon Pro 560X OpenGL Engine
[osgEarth]  [Capabilities]   Version = 2.1 ATI-2.4.9
[osgEarth]  [Capabilities]   Core Profile = no
[osgEarth]  [Capabilities]   Max GPU texture units = 16
[osgEarth]  [Capabilities]   Max GPU texture coord indices = 8
[osgEarth]  [Capabilities]   Max GPU attributes = 16
[osgEarth]  [Capabilities]   Depth buffer bits = 24
[osgEarth]  [Capabilities]   Max texture size = 16384
[osgEarth]  [Capabilities]   GLSL = yes
[osgEarth]  [Capabilities]   GLSL Version = 120
[osgEarth]  [Capabilities]   Texture arrays = yes
[osgEarth]  [Capabilities]   draw instanced = no
[osgEarth]  [Capabilities]   ...but disabled, since UBO block size reports zero
[osgEarth]  [Capabilities]   Texture buffers = no
[osgEarth]  [Capabilities]   Compression = ARB S3

The output of this actually brings up another question I had (which I was saving for later) – how to get a core profile context for my application, which I anticipate should be possible on my fairly up-to-date hardware...

Postdoctoral Researcher
University of Wisconsin – Madison
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Error in ImageLayer after building on Mac?

Daven,
First you need a new driver. osgEarth requires OpenGL 3.3 at a minimum.

Next, I believe building to a GL CORE profile is actually mandatory on the OSX platform.
This document can hopefully help:

https://gist.github.com/gwaldron/a56b0e77e7fa8587b698717d21f9366d

Good luck!
Glenn Waldron / Pelican Mapping
davenquinn davenquinn
Reply | Threaded
Open this post in threaded view
|

Re: Error in ImageLayer after building on Mac?

OK thanks for the info. I don't think a new driver is feasible since this is the standard integrated card in a Macbook Pro laptop; the only/best drivers are those available by default from Apple.

That said, the fact that I can't get a core profile context seems to be the root of the issue. I've been using OpenSceneGraph built with Homebrew, which has worked in the past to get OSGEarth up and running. I will build myself using the steps you outlined below and report how that impacts the issue.

Thanks!
Postdoctoral Researcher
University of Wisconsin – Madison