SFML community forums

Help => General => Topic started by: Rimher on September 26, 2012, 05:16:36 pm

Title: Resources [XCode 4.5]
Post by: Rimher on September 26, 2012, 05:16:36 pm
Hello there! I've been trying to compile a couple of shaders in my project, but I had the hardest time.
I had put the two files "vertexShader.vs" and "fragmentShader.fs" in the Resources folder, that's already built in the project.
I was trying to access those files calling
Quote
resourcePath()+"fragmentShader.fs"

But it was failing to open both files. When I use the absolute path to the file, it is indeed found. Since this is not the most elegant solution and in the tutorial I read that every file that I dragged&dropped into the folder would be copied there, how's it possible that those files are not found??

Title: Re: Resources [XCode 4.5]
Post by: Hiura on September 26, 2012, 07:31:32 pm
I just tried it out and it seems Xcode "compile" .fs files (however, I've no clue what it does with it).

What you need do is :

- go to your project preference
- in the build phases tab
- remove any .fs files from the 'compile source' phase
- add those same files to 'copy bundle resources' phase

Let me know if it does work.
Title: Re: Resources [XCode 4.5]
Post by: Rimher on September 26, 2012, 07:37:12 pm
I just tried it out and it seems Xcode "compile" .fs files (however, I've no clue what it does with it).

What you need do is :

- go to your project preference
- in the build phases tab
- remove any .fs files from the 'compile source' phase
- add those same files to 'copy bundle resources' phase

Let me know if it does work.
Works perfectly now! Thanks a lot  ;)
Title: Re: Resources [XCode 4.5]
Post by: Hiura on September 26, 2012, 07:42:15 pm
you're welcome  :)