Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gwaldron/osgearth
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbeverage committed Feb 14, 2024
2 parents 6405f1f + 3605392 commit 540abe1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions src/applications/osgearth_drawables/osgearth_drawables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ main(int argc, char** argv)

osg::ArgumentParser arguments(&argc,argv);
osgViewer::Viewer viewer(arguments);
viewer.setRealizeOperation(new GL3RealizeOperation());

osg::ref_ptr<osg::Node> node = createDrawables();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,15 @@ main(int argc, char** argv)
if (keys.empty())
return usage(argv[0], "No data in extent");

JobArena arena("GroundCover Export", 4u);

std::cout << "Exporting " << keys.size() << " keys.." << std::endl;

jobs::context ctx;
ctx.pool = jobs::get_pool("GroundCover Export");
ctx.pool->set_concurrency(4u);

for (const auto& key : keys)
{
Job(&arena).dispatch(
[&app, key](Cancelable*)
{
app.exportKey(key);
}
);
jobs::dispatch([&app, key]() { app.exportKey(key); }, ctx);
}

unsigned totalFeatures = 0u;
Expand Down
6 changes: 6 additions & 0 deletions src/osgEarth/ImGui/TerrainGUI
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ namespace osgEarth
options.setMaxLOD(max_lod);
}

bool progressive = options.getProgressive();
if (ImGuiLTable::Checkbox("Progressive load", &progressive))
{
options.setProgressive(progressive);
}

TerrainLODMethod method = options.getLODMethod();
bool method_b = (method == TerrainLODMethod::SCREEN_SPACE);
if (ImGuiLTable::Checkbox("Screen space LOD", &method_b))
Expand Down
4 changes: 2 additions & 2 deletions src/osgEarth/Notify
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace osgEarth

struct OSGEARTH_EXPORT NotifyPrefix
{
static std::string DEBUG;
static std::string DEBUG_INFO;
static std::string INFO;
static std::string NOTICE;
static std::string WARN;
Expand All @@ -72,7 +72,7 @@ namespace osgEarth
#define OE_NOTICE OE_NOTIFY(osg::NOTICE, osgEarth::NotifyPrefix::NOTICE)
#define OE_INFO OE_NOTIFY(osg::INFO, osgEarth::NotifyPrefix::INFO)
#define OE_INFO_CONTINUE OE_NOTIFY(osg::INFO, "")
#define OE_DEBUG OE_NOTIFY(osg::DEBUG_INFO, osgEarth::NotifyPrefix::DEBUG)
#define OE_DEBUG OE_NOTIFY(osg::DEBUG_INFO, osgEarth::NotifyPrefix::DEBUG_INFO)
#endif

#define OE_NULL if(false) osgEarth::notify(osg::ALWAYS)
Expand Down
4 changes: 2 additions & 2 deletions src/osgEarth/Notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct NotifyStream : public std::ostream

using namespace osgEarth;

std::string NotifyPrefix::DEBUG = "[osgEarth] ";
std::string NotifyPrefix::DEBUG_INFO = "[osgEarth] ";
std::string NotifyPrefix::INFO = "[osgEarth] ";
std::string NotifyPrefix::NOTICE = "[osgEarth] ";
std::string NotifyPrefix::WARN = "[osgEarth]* ";
Expand All @@ -156,7 +156,7 @@ namespace
_logger->set_pattern("%^[%n %l]%$ %v");
_logger->set_level(spdlog::level::debug);

NotifyPrefix::DEBUG = {};
NotifyPrefix::DEBUG_INFO = {};
NotifyPrefix::INFO = {};
NotifyPrefix::NOTICE = {};
NotifyPrefix::WARN = {};
Expand Down
2 changes: 1 addition & 1 deletion src/osgEarth/XmlUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ XmlElement::getConfig(const std::string& referrer) const
URIContext uriContext(referrer);
URI uri(href, uriContext);
const std::string& fullURI = uri.full();
OE_DEBUG << "Loading href from " << fullURI << std::endl;
//OE_DEBUG << "Loading href from " << fullURI << std::endl;

osg::ref_ptr< XmlDocument > doc = XmlDocument::load(fullURI);
if (doc && doc->getChildren().size() > 0)
Expand Down
4 changes: 2 additions & 2 deletions src/osgEarthDrivers/engine_rex/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ Merger::traverse(osg::NodeVisitor& nv)
if (next->_result.available())
{
next->merge();
++count;
}
else
{
//OE_INFO << LC << "Abandoned " << next->_name << std::endl;
}
}

++count;

_mergeQueue.pop();

if (_metrics)
{
_metrics->running--;
Expand Down
4 changes: 1 addition & 3 deletions src/osgEarthSplat/RoadSurfaceLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ RoadSurfaceLayer::init()
{
ImageLayer::init();

_keygate.setName("RoadSurfaceLayer " + getName());

// Generate Mercator tiles by default.
setProfile(Profile::create(Profile::GLOBAL_GEODETIC));

Expand Down Expand Up @@ -434,7 +432,7 @@ RoadSurfaceLayer::createImageImplementation(const TileKey& key, ProgressCallback
progress,
[layer]() {
osg::ref_ptr<const Layer> safe;
return !layer.lock(safe) || !safe->isOpen() || !JobArena::alive();
return !layer.lock(safe) || !safe->isOpen() || !jobs::alive();
}
);

Expand Down

0 comments on commit 540abe1

Please sign in to comment.