]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Merge branch 'tat/configure' into next
[flightgear.git] / src / Main / fg_commands.cxx
index 7ca69fca4b34d8b424f6ba1f2a0e05ea05dd82db..e92cb0f52dc443b227f3f950e051fdaa5103725d 100644 (file)
@@ -15,6 +15,7 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_random.h>
 #include <simgear/scene/material/mat.hxx>
+#include <simgear/scene/material/matlib.hxx>
 #include <simgear/structure/exception.hxx>
 #include <simgear/structure/commands.hxx>
 #include <simgear/props/props.hxx>
@@ -38,6 +39,7 @@
 
 #include "fg_init.hxx"
 #include "fg_io.hxx"
+#include "fg_os.hxx"
 #include "fg_commands.hxx"
 #include "fg_props.hxx"
 #include "globals.hxx"
@@ -133,15 +135,15 @@ static bool
 compare_values (SGPropertyNode * value1, SGPropertyNode * value2)
 {
     switch (value1->getType()) {
-    case SGPropertyNode::BOOL:
+    case simgear::props::BOOL:
         return (value1->getBoolValue() == value2->getBoolValue());
-    case SGPropertyNode::INT:
+    case simgear::props::INT:
         return (value1->getIntValue() == value2->getIntValue());
-    case SGPropertyNode::LONG:
+    case simgear::props::LONG:
         return (value1->getLongValue() == value2->getLongValue());
-    case SGPropertyNode::FLOAT:
+    case simgear::props::FLOAT:
         return (value1->getFloatValue() == value2->getFloatValue());
-    case SGPropertyNode::DOUBLE:
+    case simgear::props::DOUBLE:
         return (value1->getDoubleValue() == value2->getDoubleValue());
     default:
         return !strcmp(value1->getStringValue(), value2->getStringValue());
@@ -496,6 +498,13 @@ do_screen_capture (const SGPropertyNode * arg)
   return fgDumpSnapShot();
 }
 
+static bool
+do_reload_shaders (const SGPropertyNode*)
+{
+    simgear::reload_shaders();
+    return true;
+}
+
 static bool
 do_dump_scene_graph (const SGPropertyNode*)
 {
@@ -1224,7 +1233,7 @@ do_set_cursor (const SGPropertyNode * arg)
     }
 
     SGPropertyNode *cursor = const_cast<SGPropertyNode *>(arg)->getNode("cursor", true);
-    if (cursor->getType() != SGPropertyNode::NONE)
+    if (cursor->getType() != simgear::props::NONE)
         fgSetMouseCursor(cursor->getIntValue());
 
     cursor->setIntValue(fgGetMouseCursor());
@@ -1563,6 +1572,7 @@ static struct {
     { "release-cockpit-button", do_release_cockpit_button },
     { "dump-scenegraph", do_dump_scene_graph },
     { "dump-terrainbranch", do_dump_terrain_branch },
+    { "reload-shaders", do_reload_shaders },
     { 0, 0 }                   // zero-terminated
 };