Page 1 of 1

Setting up custom providers with C++

Posted: 13 May 2023, 03:42
by fantasto1949
Hi :)

I'm trying to implement Noesis into my OpenGL/C++ project on Windows/Visual Studio and looked through the examples how to integrate it. Sadly the part of setting up the providers is skipped.
I have the vague idea that I need to make my own classes, like e.g.: class MyXamlProvider : public Noesis::XamlProvider
And then override all the virtual functions to return what's needed.
But I have to admit that I don't really know how to implement those functions, at least I don't feel confident about it and I don't want to do something wrong.
Is there any chance to provide some examples on how to implement those classes (Providers & Stream)?

Re: Setting up custom providers with C++

Posted: 15 May 2023, 11:24
by sfernandez
When you download our Native SDK (C++), it comes with source code for all our application framework, which includes implementations of Providers in Src/Packages/App/Providers:
  • Local providers: access resources stored in the file system
  • Embedded providers: access resources compiled into the executable as a byte stream in a header
The Stream class is just a wrapper over a buffer that allows us to read bytes from it.

Hope this helps.

Re: Setting up custom providers with C++

Posted: 16 May 2023, 14:47
by jsantos
What example are you using? All our examples (with the exception of IntegrationGLUT) use the provider implementations mentioned above by Sergio.