SFML community forums

Help => Graphics => Topic started by: macattack1459 on August 01, 2012, 07:40:09 am

Title: Can't load postfx (sfml 1.6, xcode 3)
Post by: macattack1459 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.
Title: Re: Can't load postfx (sfml 1.6, xcode 3)
Post by: macattack1459 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?
Title: Re: Can't load postfx (sfml 1.6, xcode 3)
Post by: Hiura 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.