Problems with resource loading


#1

Hey guys,

Once again I need your help :slight_smile:

I’m having issues to integrate and load resource files in my project in a consistent way.

Basically I’m trying to add 2 shader files (default.vsh and default.fsh) and load them in a generic way that all the supported platforms would understand.
I’ve read the file components in the Juce SDK and tried several approaches but nothing works.

Could you guys explain how to integrate them in the project and give me some code to open the files in a generic way ?

Thanks,


#2

Put them in as BinaryData. The IntroJucer will do it for you, or put them in a folder and run BinaryBuilder on it. Now you will have a C++ file with the shaders, and you can access it as a string.

Bruce