1 // model.hxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain, and comes with no warranty.
10 # error This library requires C++
13 #include <simgear/compiler.h>
19 #include <osg/Texture2D>
20 #include <osgDB/ReaderWriter>
22 #include <simgear/misc/sg_path.hxx>
25 SGLoadTexture2D(bool staticTexture, const std::string& path,
26 const osgDB::ReaderWriter::Options* options = 0,
27 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
29 inline osg::Texture2D*
30 SGLoadTexture2D(const std::string& path,
31 const osgDB::ReaderWriter::Options* options = 0,
32 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
34 return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
37 inline osg::Texture2D*
38 SGLoadTexture2D(const SGPath& path,
39 const osgDB::ReaderWriter::Options* options = 0,
40 bool wrapu = true, bool wrapv = true,
41 int mipmaplevels = -1)
43 return SGLoadTexture2D(true, path.str(), options, wrapu, wrapv,
47 inline osg::Texture2D*
48 SGLoadTexture2D(bool staticTexture, const SGPath& path,
49 const osgDB::ReaderWriter::Options* options = 0,
50 bool wrapu = true, bool wrapv = true,
51 int mipmaplevels = -1)
53 return SGLoadTexture2D(staticTexture, path.str(), options, wrapu, wrapv,