WS3.0: Initial commit of WS3.0 rendering
This commit is contained in:
parent
f21b9b651b
commit
0982b2827a
2 changed files with 9 additions and 1 deletions
|
@ -360,7 +360,10 @@ bool FGStgTerrain::scenery_available(const SGGeod& position, double range_m)
|
|||
if( schedule_scenery(position, range_m, 0.0) )
|
||||
{
|
||||
double elev;
|
||||
if (!get_elevation_m(SGGeod::fromGeodM(position, SG_MAX_ELEVATION_M), elev, 0, 0))
|
||||
|
||||
bool use_vpb = globals->get_props()->getNode("scenery/use-vpb")->getBoolValue();
|
||||
|
||||
if (!use_vpb && !get_elevation_m(SGGeod::fromGeodM(position, SG_MAX_ELEVATION_M), elev, 0, 0))
|
||||
{
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, "FGStgTerrain::scenery_available - false" );
|
||||
return false;
|
||||
|
|
|
@ -141,12 +141,14 @@ public:
|
|||
listenToNode("znear", 0.1f);
|
||||
listenToNode("zfar", 120000.0f);
|
||||
listenToNode("near-field", 100.0f);
|
||||
listenToNode("lod", 1.5f);
|
||||
}
|
||||
|
||||
virtual ~CameraGroupListener() {
|
||||
unlisten("znear");
|
||||
unlisten("zfar");
|
||||
unlisten("near-field");
|
||||
unlisten("lod");
|
||||
}
|
||||
|
||||
virtual void valueChanged(SGPropertyNode* prop) {
|
||||
|
@ -156,6 +158,9 @@ public:
|
|||
_cameraGroup->_zFar = prop->getFloatValue();
|
||||
} else if (!strcmp(prop->getName(), "near-field")) {
|
||||
_cameraGroup->_nearField = prop->getFloatValue();
|
||||
} else if (!strcmp(prop->getName(), "lod")) {
|
||||
const float new_lod = prop->getFloatValue();
|
||||
_cameraGroup->_viewer->getCamera()->setLODScale(new_lod);
|
||||
}
|
||||
}
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue