]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/scenery.cxx
Updates to the scenery loading infrastructure to make it more flexible,
[flightgear.git] / src / Scenery / scenery.cxx
index 2c0bf3f0d74227fcd89034533d6565a16593b36a..0f78f66ac149ffb9c9c5cfbfa10ed0350c2fbf74 100644 (file)
 #endif
 
 #include <GL/glut.h>
-#include <simgear/xgl/xgl.h>
+#include <GL/gl.h>
 
 #include <stdio.h>
 #include <string.h>
 
 #include <simgear/debug/logstream.hxx>
 
+#include <Main/fg_props.hxx>
+
 #include "scenery.hxx"
 
 
 // Shared structure to hold current scenery parameters
-struct fgSCENERY scenery;
+FGScenery scenery;
+
 
+// Scenery Management system
+FGScenery::FGScenery() {
+    SG_LOG( SG_TERRAIN, SG_INFO, "Initializing scenery subsystem" );
+
+    center = Point3D(0.0);
+    cur_elev = -9999;
+}
 
 // Initialize the Scenery Management system
-int fgSceneryInit( void ) {
-    FG_LOG( FG_TERRAIN, FG_INFO, "Initializing scenery subsystem" );
+FGScenery::~FGScenery() {
+}
 
-    scenery.cur_elev = -9999;
+void FGScenery::init() {
+}
+
+void FGScenery::update(int dt) {
+}
+
+void FGScenery::bind() {
+    fgTie("/environment/ground-elevation-m", this,
+         &FGScenery::get_cur_elev, &FGScenery::set_cur_elev);
+}
 
-    return 1;
+void FGScenery::unbind() {
+    fgUntie("/environment/ground-elevation-m");
 }