Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Resources [XCode 4.5]  (Read 1804 times)

0 Members and 1 Guest are viewing this topic.

Rimher

  • Newbie
  • *
  • Posts: 6
    • View Profile
Resources [XCode 4.5]
« 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??


Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Resources [XCode 4.5]
« Reply #1 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.
SFML / OS X developer

Rimher

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Resources [XCode 4.5]
« Reply #2 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  ;)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Resources [XCode 4.5]
« Reply #3 on: September 26, 2012, 07:42:15 pm »
you're welcome  :)
SFML / OS X developer

 

anything