Rick
Topic Author
Posts: 50
Joined: 26 Nov 2013, 15:35

IResourceSystem

07 Apr 2015, 23:55

I'm looking at some older code and I find this line but it says there is no IResourceSystem:
Noesis::Core::Ptr<Noesis::Resource::ResourceProvider> provider = *new Noesis::Resource::LocalResourceProvider(path.c_str());

// errors on this line	
NsGetSystem<Noesis::Resource::IResourceSystem>()->AddProvider(provider.GetPtr());

What would be the new way to do this?
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: IResourceSystem

08 Apr 2015, 00:34

Hi!

In noesisGUI v1.2 we have simplified our API. Now all the integrating functionality is inside the NoesisGUI.h file. The functions you are looking for are:
/// Adds a local directory to the list of providers used to load resources
NS_GUI_CORE_API void AddResourceProvider(const NsChar* rootFolder);

/// Adds a custom provider to the list of providers used to load resources
NS_GUI_CORE_API void AddResourceProvider(Resource::IResourceProvider* provider);
Also, in v1.2, our API is exposed in a single file (that you should use as a precompiled header) inside a single namespace:
#include <NoesisGUI.h>
using namespace Noesis;
Including that way, your function would be Noesis::GUI::AddResourceProvider

All this information is detailed in our Integration Tutorial (source code included).

Cheers.
 
Rick
Topic Author
Posts: 50
Joined: 26 Nov 2013, 15:35

Re: IResourceSystem

08 Apr 2015, 02:20

Thank you this helped!

Who is online

Users browsing this forum: No registered users and 1 guest