]> git.mxchange.org Git - flightgear.git/blobdiff - src/Viewer/renderingpipeline.hxx
Rely entirely on the configurable renderer and add more configuration options in...
[flightgear.git] / src / Viewer / renderingpipeline.hxx
index 293e627b03c3615ddf1496e8236361ba20079eb8..9f165bd15b303ebdc9a9899f625bcf5bfc1c9f83 100644 (file)
@@ -6,6 +6,8 @@
 #include <osg/Camera>
 #include <string>
 
+#include <simgear/structure/SGExpression.hxx>
+
 namespace simgear
 {
 class SGReaderWriterOptions;
@@ -24,7 +26,19 @@ namespace flightgear {
 
 class FGRenderingPipeline : public osg::Referenced {
 public:
-    struct Buffer : public osg::Referenced {
+    class Conditionable : public osg::Referenced {
+    public:
+        Conditionable() : _alwaysValid(true) {}
+        void parseCondition(SGPropertyNode* prop);
+        bool getAlwaysValid() const { return _alwaysValid; }
+        void setAlwaysValid(bool val) { _alwaysValid = val; }
+        void setValidExpression(SGExpressionb* exp);
+        bool valid();
+    protected:
+        bool _alwaysValid;
+        SGSharedPtr<SGExpressionb> _validExpression;
+    };
+    struct Buffer : public Conditionable {
         Buffer(SGPropertyNode* prop);
 
         std::string name;
@@ -40,29 +54,32 @@ public:
                //osg::Vec4 borderColor;
     };
 
-    struct Pass : public osg::Referenced {
+    struct Pass : public Conditionable {
         Pass(SGPropertyNode* prop);
 
         std::string name;
         std::string type;
+        int orderNum;
+        std::string effect;
     };
 
-    struct Attachment : public osg::Referenced {
+    struct Attachment : public Conditionable {
         Attachment(SGPropertyNode* prop);
         Attachment(osg::Camera::BufferComponent c, const std::string& b ) : component(c), buffer(b) {}
 
         osg::Camera::BufferComponent component;
         std::string buffer;
     };
+    typedef std::vector<osg::ref_ptr<Attachment> > AttachmentList;
 
-    struct Stage : public osg::Referenced {
+    struct Stage : public Pass {
         Stage(SGPropertyNode* prop);
 
-        std::string name;
-        std::string type;
+        bool needsDuDv;
+        float scaleFactor;
 
         std::vector<osg::ref_ptr<Pass> > passes;
-        std::vector<osg::ref_ptr<Attachment> > attachments;
+        AttachmentList attachments;
     };
     FGRenderingPipeline();
 
@@ -73,4 +90,13 @@ public:
                    const simgear::SGReaderWriterOptions* options);
 };
 
+namespace flightgear {
+
+class PipelinePredParser : public simgear::expression::ExpressionParser
+{
+public:
+protected:
+};
+}
+
 #endif