Hello,
I'm having trouble getting something to compile. I'm trying to use smgr->getMesh() with an std::string.
I'm writing a generic model loader function, so I guess I don't really care whether I pass it std strings or not, but after a while trawling through the API I can't work out what string format getMesh is actually looking for :S
What string format is getMesh looking for?
-
gedditoffme
- Posts: 5
- Joined: Sat Nov 01, 2008 3:15 am
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: What string format is getMesh looking for?
According to the API, virtual IAnimatedMesh* irr::scene::ISceneManager::getMesh(const io::path &filename), takes a constant reference to an io::path object.
According to the API again, io::path is a
No go ahead an figure out what fschar_t is. 
There's an overload which takes a pointer to an io::IReadFile, though.
According to the API again, io::path is a
Code: Select all
typedef core::string<fschar_t> irr::io::path
There's an overload which takes a pointer to an io::IReadFile, though.
"Whoops..."
-
gedditoffme
- Posts: 5
- Joined: Sat Nov 01, 2008 3:15 am
LOL, I really have no idea what any of that means.
if I had a function
MeshLoader(string file){
getMesh(file);
}
what type should that string be? Is it possible to convert from that type to others (and vice-versa)?
declaring it a path, or a core::string<fschar_t> don't work for me (keep getting compiler errors, and I am including "irrString.h")
if I had a function
MeshLoader(string file){
getMesh(file);
}
what type should that string be? Is it possible to convert from that type to others (and vice-versa)?
declaring it a path, or a core::string<fschar_t> don't work for me (keep getting compiler errors, and I am including "irrString.h")
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Code: Select all
MeshLoader(const std::string& file)
{
getMesh(file.c_str());
}
"Whoops..."