Ack, I am not liking Build 1250 so far.
Here's my code:
#include <SFML/Graphics.hpp>
#include <ctime>
int main(){
sf::PostFX Water;
sf::RenderWindow Window(sf::VideoMode(512, 512, 32), "Test");
if (sf::PostFX::CanUsePostFX()){
Water.LoadFromFile("Water.sfx");
Water.SetTexture("screen", NULL);
Water.SetParameter("time", (double)clock());
Window.Draw(Water);
Window.Display();
}
}
Water.sfx:
texture screen
float time
effect
{
vec2 offset = vec2(cos(time/500+_in.x*10)/50, sin(time/500+_in.y*10)/50);
_out = vec4(screen(_in+offset));
}
The Window.Draw(Water) function is giving me a segmentation fault. I looked over the Shader, and it has nothing that could be causing this afaik. Did you remove the wrappers? This code worked in earlier builds. :\ Just to be sure it wasn't my code, I even tested with this Shader:
texture screen
float time
effect{
_out = vec4(screen(_in));
}
Still get a segmentation fault.