Is there a function to load Mesh from a custom path?

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
knn217
Halfling
Posts: 70
Joined: Wed Jan 25, 2023 9:04 am
x 5

Is there a function to load Mesh from a custom path?

Post by knn217 »

MeshManager doesn't seem to have a function that uses path, only groupname. Is there another way to load meshes that use path? I think changing the path in my project's "resources2.cfg" file could also work, but having the ability to load meshes from multiple paths seems more flexible.

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: Is there a function to load Mesh from a custom path?

Post by sercero »

Not as far as I know, but you could add the path dynamically from the code.

Perhaps creating an ad-hoc resource group for single paths or creating a resource group for each path.

https://ogrecave.github.io/ogre/api/13/ ... ement.html

https://ogrecave.github.io/ogre/api/13/ ... a8b2b78c8d

knn217
Halfling
Posts: 70
Joined: Wed Jan 25, 2023 9:04 am
x 5

Re: Is there a function to load Mesh from a custom path?

Post by knn217 »

Yeah, I tried adding in my custom path to "resources2.cfg" instead of replacing the original model path and it can load from both paths, so I guess modifying "resources2.cfg" is the way.

Post Reply