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>
22 #include <osg/Texture2D>
23 #include <osgDB/ReaderWriter>
25 #include <simgear/misc/sg_path.hxx>
28 SGLoadTexture2D(bool staticTexture, const std::string& path,
29 const osgDB::ReaderWriter::Options* options = 0,
30 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
32 inline osg::Texture2D*
33 SGLoadTexture2D(const std::string& path,
34 const osgDB::ReaderWriter::Options* options = 0,
35 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
37 return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
40 inline osg::Texture2D*
41 SGLoadTexture2D(const SGPath& path,
42 const osgDB::ReaderWriter::Options* options = 0,
43 bool wrapu = true, bool wrapv = true,
44 int mipmaplevels = -1)
46 return SGLoadTexture2D(true, path.str(), options, wrapu, wrapv,
50 inline osg::Texture2D*
51 SGLoadTexture2D(bool staticTexture, const SGPath& path,
52 const osgDB::ReaderWriter::Options* options = 0,
53 bool wrapu = true, bool wrapv = true,
54 int mipmaplevels = -1)
56 return SGLoadTexture2D(staticTexture, path.str(), options, wrapu, wrapv,