timoore / vsgearth Goto Github PK
View Code? Open in Web Editor NEWosgEarth on VSG
License: Other
osgEarth on VSG
License: Other
I know it's a prototype but I've tried to build with VS2019 / Windows 11 as an experiment with latest VSG and latest osgEarth:
voe_globe.exe osgearth.git\tests\readymap.earth
Can't see the globe:
[osgEarth] [EarthSerializer2] Loaded extension lib "osgPlugins-3.6.3/osgdb_osgearth_viewpoints.dll"
[osgEarth] [Map] Map profile is: [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic]
[osgEarth] [Map] [no cache]
[osgEarth] [Capabilities] Capabilities:
[osgEarth] [Capabilities] osgEarth Version: 3.3.0 build 147
[osgEarth] [Capabilities] OSG Version: 3.6.3
[osgEarth] [Capabilities] GDAL Version: 2.4.4
[osgEarth] [Capabilities] GEOS Version: 3.6.2
[osgEarth] [Capabilities] GPU Vendor: NVIDIA Corporation
[osgEarth] [Capabilities] GPU Renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2
[osgEarth] [Capabilities] GL/Driver Version: 3.3.0 NVIDIA 527.56 (330)
[osgEarth] [Capabilities] GL Core Profile: yes
[osgEarth] [ViewpointsExtension] Read 17 viewpoints
[osgEarth] [TileLayer] "ReadyMap 15m Imagery" [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
[osgEarth] [TileLayer] "ReadyMap 90m Elevation" [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
[osgEarth] [ElevationLayer] "ReadyMap 90m Elevation" : Override vdatum = egm96 (was geodetic)
[osgEarth] [TileLayer] "ReadyMap 90m Elevation" [srs=WGS84, min=-180,-90 max=180,90 ar=2:1 vdatum=geodetic] [no cache]
[osgEarth] [TileLayer] "ReadyMap 90m Elevation" L2 cache size = 4
[osgEarth] [JobArena] Arena "oe.nodepager" concurrency=2
[osgEarth] [JobArena] Arena "oe.nodepager" concurrency=4
[osgEarth] [MapNode] Added extension "viewpoints"
[osgEarth] [TileLayer] "ReadyMap 15m Imagery" Building data extents index with 883 extents
[osgEarth] [TileLayer] "ReadyMap 90m Elevation" Building data extents index with 875 extents
numOperationThreads = 0
numTilesRead = 0
average TimeReadingTiles = -nan(ind)
[osgEarth] [JobArena] Shutting down all job arenas.
I had some build issues and tried to temporary fix this with following patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a787a2d..69bbe3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,14 @@ endif()
set(VSG_MIN_VERSION 1.0.0)
find_package(vsg ${VSG_MIN_VERSION} REQUIRED)
+find_package(OpenSceneGraph REQUIRED)
+include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
+
+FIND_PATH( GLCORE_GLCOREARB_HEADER
+ NAMES GL/glcorearb.h GL3/glcorearb.h OpenGL/glcorearb.h gl/glcorearb.h
+)
+include_directories(${GLCORE_GLCOREARB_HEADER})
+
# find osg2vsg package for loading image/nodes using OpenSceneGraph
find_package(osg2vsg REQUIRED)
set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} osg2vsg::osg2vsg)
diff --git a/src/vsgEarth/CMakeLists.txt b/src/vsgEarth/CMakeLists.txt
index 81ca9c0..e2fc81f 100644
--- a/src/vsgEarth/CMakeLists.txt
+++ b/src/vsgEarth/CMakeLists.txt
@@ -37,6 +37,7 @@ target_link_libraries(${LIB_NAME} vsg::vsg osgEarth ${OpenSceneGraph_LIBRARIES})
target_compile_definitions(${LIB_NAME} PRIVATE vsgXchange_FOUND)
target_link_libraries(${LIB_NAME} vsgXchange::vsgXchange)
+target_link_libraries(${LIB_NAME} ${EXTRA_LIBRARIES})
SET(CONCAT_COMMAND ${CMAKE_SOURCE_DIR}/CMakeModules/ConcatFiles.cmake)
# Our GLSL "library" of functions that are made available in vertex and fragment shaders
diff --git a/src/vsgEarth/TileReaderVOE.cpp b/src/vsgEarth/TileReaderVOE.cpp
index b96a06f..f4eb426 100644
--- a/src/vsgEarth/TileReaderVOE.cpp
+++ b/src/vsgEarth/TileReaderVOE.cpp
@@ -36,7 +36,7 @@ vsg::ref_ptr<vsg::Object> TileReaderVOE::read(const vsg::Path& filename, vsg::re
if (!te)
return {};
- std::string tile_info = filename.substr(0, filename.length() - 5);
+ std::string tile_info = filename.string().substr(0, filename.length() - 5);
if (tile_info == "root")
{
return read_root(options);
Excuse me, could you please tell me the versions of the osg, osgearth, vsg. I am the new in this field,i can't complie the vsgearth.I want to know if the versions causing the problem! thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.