# error This library requires C++
#endif
-#include <vector>
-
-SG_USING_STD(vector);
-
-#include <plib/sg.h>
-#include <plib/ssg.h>
-
-#include <simgear/props/props.hxx>
-
-
-// Has anyone done anything *really* stupid, like making min and max macros?
-#ifdef min
-#undef min
-#endif
-#ifdef max
-#undef max
-#endif
-
-
-/**
- * Load a 3D model with or without XML wrapper. Note, this version
- * Does not know about or load the panel/cockpit information. Use the
- * "model_panel.hxx" version if you want to load an aircraft
- * (i.e. ownship) with a panel.
- *
- * If the path ends in ".xml", then it will be used as a property-
- * list wrapper to add animations to the model.
- *
- * Subsystems should not normally invoke this function directly;
- * instead, they should use the FGModelLoader declared in loader.hxx.
- */
-ssgBranch *
-sgLoad3DModel( const string& fg_root, const string &path,
- SGPropertyNode *prop_root, double sim_time_sec,
- ssgEntity *(*load_panel)(SGPropertyNode *) = 0 );
-
+#include <simgear/compiler.h>
-/**
- * Make an offset matrix from rotations and position offset.
- */
-void
-sgMakeOffsetsMatrix( sgMat4 * result, double h_rot, double p_rot, double r_rot,
- double x_off, double y_off, double z_off );
-
-/**
- * Make the animation
- */
-void
-sgMakeAnimation( ssgBranch * model,
- const char * name,
- vector<SGPropertyNode_ptr> &name_nodes,
- SGPropertyNode *prop_root,
- SGPropertyNode_ptr node,
- double sim_time_sec,
- vector<ssgBranch *> &ignore_branches );
-
-/**
- * Set the filter state on models
- */
-bool
-sgSetModelFilter( bool filter );
+#include <vector>
+#include <set>
+
+#include <osg/Node>
+#include <osg/Texture2D>
+#include <osgDB/ReaderWriter>
+
+#include <simgear/misc/sg_path.hxx>
+
+osg::Texture2D*
+SGLoadTexture2D(bool staticTexture, const std::string& path,
+ const osgDB::ReaderWriter::Options* options = 0,
+ bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
+
+inline osg::Texture2D*
+SGLoadTexture2D(const std::string& path,
+ const osgDB::ReaderWriter::Options* options = 0,
+ bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
+{
+ return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
+}
+
+inline osg::Texture2D*
+SGLoadTexture2D(const SGPath& path,
+ const osgDB::ReaderWriter::Options* options = 0,
+ bool wrapu = true, bool wrapv = true,
+ int mipmaplevels = -1)
+{
+ return SGLoadTexture2D(true, path.str(), options, wrapu, wrapv,
+ mipmaplevels);
+}
+
+inline osg::Texture2D*
+SGLoadTexture2D(bool staticTexture, const SGPath& path,
+ const osgDB::ReaderWriter::Options* options = 0,
+ bool wrapu = true, bool wrapv = true,
+ int mipmaplevels = -1)
+{
+ return SGLoadTexture2D(staticTexture, path.str(), options, wrapu, wrapv,
+ mipmaplevels);
+}
#endif // __MODEL_HXX