Page 1 of 1

Data/GL/Drawing resources

Posted: 18 Feb 2014, 01:42
by donjames
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

Re: Data/GL/Drawing resources

Posted: 18 Feb 2014, 12:44
by jsantos
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.

Re: Data/GL/Drawing resources

Posted: 18 Feb 2014, 15:35
by donjames
I tried calling CreateDiskFileSystem but it crashes (this is on Mac)
I call it before NsGetKernel()->Init();
I think might be a bug.

Re: Data/GL/Drawing resources

Posted: 18 Feb 2014, 16:34
by jsantos
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()

Re: Data/GL/Drawing resources

Posted: 18 Feb 2014, 17:19
by donjames
That works
Thanks
Don