getTexture(const io::path& filename) via com

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bogQ
Posts: 11
Joined: Sat Jan 09, 2010 1:06 pm

getTexture(const io::path& filename) via com

Post by bogQ »

I'm trying to access parts of engine via com objects but i'm stuck on path parameter io::path as it need i presume object bound to that file.
Is there a way of inputing path parameter with no io::path included, like string path, or whud i need to IReferenceCounted some func with string input and to link it to do what io::path do?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: getTexture(const io::path& filename) via com

Post by CuteAlien »

I think strings will automatially be cast to io::path when you use them.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
bogQ
Posts: 11
Joined: Sat Jan 09, 2010 1:06 pm

Re: getTexture(const io::path& filename) via com

Post by bogQ »

i thought so too, but when i declare passed input parameter as string it crashe the process. If i use virtual const io::path& getFileName(u32 index) const = 0;
and set the return value to be a pointer type, calling getTexture parametar with it declared as pointer works.
So that's why i was looking the solution so that i would not need to pass anything, but to form pointer directly from string input or at least calling directly io::path, but i didn't find what part of engine that do allow me access to io::path so that i can call him with com.

Im not saying that i done that call correctly (i probably mesed up on declaring tupe of string) so can you at least tell me what exact type of string is need (and is it byte depended) to be passed to io::path so that i can try one more time?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: getTexture(const io::path& filename) via com

Post by hybrid »

io::path is just a typedef for either stringc or stringw, depending on your settings of UTF usage for file system access.
Post Reply