]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/mat.hxx
Clear tile cache on (re-)init.
[simgear.git] / simgear / scene / material / mat.hxx
index ac2e5f1bb26d6343b708e82a63f56c9e5fed673c..9e2d06e432d58d7f490a85c4222040ab4f87ece2 100644 (file)
 #include <simgear/math/SGMath.hxx>
 
 #include <osg/ref_ptr>
-#include <osgDB/ReaderWriter>
 
 namespace osg
 {
 class StateSet;
 }
 
+#include <simgear/scene/model/SGReaderWriterXMLOptions.hxx>
 #include <simgear/props/props.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
 #include <simgear/scene/util/SGSceneFeatures.hxx>
@@ -87,6 +87,8 @@ public:
    */
   SGMaterial( const osgDB::ReaderWriter::Options*, const SGPropertyNode *props);
 
+  SGMaterial(const simgear::SGReaderWriterXMLOptions*,
+             const SGPropertyNode *props);
   /**
    * Destructor.
    */
@@ -270,12 +272,15 @@ protected:
 protected:
 
   struct _internal_state {
+      _internal_state(simgear::Effect *e, bool l,
+                      const simgear::SGReaderWriterXMLOptions *o);
       _internal_state(simgear::Effect *e, const std::string &t, bool l,
-                      const osgDB::ReaderWriter::Options *o);
+                      const simgear::SGReaderWriterXMLOptions *o);
+      void add_texture(const std::string &t, int i);
       osg::ref_ptr<simgear::Effect> effect;
-      std::string texture_path;
+      std::vector<std::pair<std::string,int> > texture_paths;
       bool effect_realized;
-      osg::ref_ptr<const osgDB::ReaderWriter::Options> options;
+      osg::ref_ptr<const simgear::SGReaderWriterXMLOptions> options;
   };
 
 private:
@@ -361,9 +366,9 @@ private:
   // Internal constructors and methods.
   ////////////////////////////////////////////////////////////////////
 
-  void read_properties(const osgDB::ReaderWriter::Options* options,
+  void read_properties(const simgear::SGReaderWriterXMLOptions* options,
                         const SGPropertyNode *props);
-  void buildEffectProperties(const osgDB::ReaderWriter::Options* options);
+  void buildEffectProperties(const simgear::SGReaderWriterXMLOptions* options);
 };