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

Author Topic: Can't load postfx (sfml 1.6, xcode 3)  (Read 1360 times)

0 Members and 1 Guest are viewing this topic.

macattack1459

  • Newbie
  • *
  • Posts: 3
    • View Profile
Can't load postfx (sfml 1.6, xcode 3)
« on: August 01, 2012, 07:40:09 am »
Hello, I've been having an issue where my application will not load and shaders:

if (!Effect.LoadFromFile("blur.sfx")){
        return EXIT_SUCCESS;
        }

This causes the application to exit but I have a file named blur.sfx copied into my resources folder.  I tried replacing blur with the code from the postfx tutorial on the sfml website and it still will not load.  My computer can use postfx too because I check for that as well.  Perhaps this is xcode at fault but I'm not sure and ideas?

edit:  here is the error from xcode's console:
Failed to compile post-effect :
ERROR: 0:5: 'vec4' : syntax error syntax error
ERROR: Parser found no code to compile in source strings.
« Last Edit: August 01, 2012, 07:47:16 am by macattack1459 »

macattack1459

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can't load postfx (sfml 1.6, xcode 3)
« Reply #1 on: August 01, 2012, 08:11:28 am »
Well I fixed the problem...  Oddly enough it was solved by changing the syntax hi-lighting to GLSL. O.o
I guess xcode didn't register that it was a shader till i changed the hi-lighting or something?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Can't load postfx (sfml 1.6, xcode 3)
« Reply #2 on: August 01, 2012, 10:31:22 am »
I guess xcode didn't register that it was a shader till i changed the hi-lighting or something?
That's exactly that; you have to tell Xcode what kind of file it is so it can use the proper compilation process.
SFML / OS X developer

 

anything