donjames
Topic Author
Posts: 25
Joined: 27 May 2013, 16:35

Data/GL/Drawing resources

18 Feb 2014, 01:42

I am not using Xaml files. But I still need to install the Data folder because of the drawing shaders.

1) Is it possible for me to set the explicit path of the Data folder at runtime? Currently it is in the working directory of the executable

2) I would like to make a feature request that you avoid the client apps needing to install this. It will be cool if you can use your library (dll/dylib) and not have to install anything else.

Thanks
Don
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Data/GL/Drawing resources

18 Feb 2014, 12:44

By default, the data folder is searched at %EXE_PATH/Data/%PLATFORM but you can override this behavior by setting a custom file system before initialization by using the function IResourceSystem::SetFileSystem.

1. If you want to change only the path you can use our DiskFileSystem and set the root path to the desired location. The must use CreateDiskFileSystem() at DiskFileSystem.h:
Ptr<IFileSystem> fs = CreateDiskFileSystem(myPath);
2. For 1.2.x we have plans to improve the way the database of resources is handled. It is very intrusive right now. Among many things, one of the planned changed is having all the default resources included inside our binaries. But if this is important for you, you can implement it yourself. You have to implement a custom filesystem (you have a sample here https://github.com/Noesis/OgreBindings) and include the resources inside a cpp (with a tool that dump files to c array of chars).

Thanks.
 
donjames
Topic Author
Posts: 25
Joined: 27 May 2013, 16:35

Re: Data/GL/Drawing resources

18 Feb 2014, 15:35

I tried calling CreateDiskFileSystem but it crashes (this is on Mac)
I call it before NsGetKernel()->Init();
I think might be a bug.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Data/GL/Drawing resources

18 Feb 2014, 16:34

Sorry, I was not clear here. You cannot create any Noesis object without having called Init() first. The, the filesystem creation must be done after Kernel::Init() and before Kernel::InitSystems()
 
donjames
Topic Author
Posts: 25
Joined: 27 May 2013, 16:35

Re: Data/GL/Drawing resources

18 Feb 2014, 17:19

That works
Thanks
Don

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 90 guests