I've decided to try out sf::shader, however when I make even the simplest of shader programs I get errors I can't make sense of. I'm not new to GLSL, I've used it in unity.
My code is the example code from the "getting started with 2d drawing" tutorial with little modification.
the code I've added (besides initializing a simple sf:RectangleShape) is the following:
const std::string fragmentShader = "void main(){}";
shader.loadFromMemory(fragmentShader, sf::Shader::Fragment);
The expected result is a fragment shader that does nothing (I had more, but tried eliminating lines to find the root issue)
I get an unexpected error message upon running the program,
Failed to complile fragment shader:
Fragment shader failed to compile with the following errors:
ERROR: 0:1 error(#132) Syntax error: "<" parse error
ERROR: error(#273) 1 compilation errors. No code generated
Note that there is no '<' in the code, also sometimes when I run the program it has a similar error but with a '!' indicated as the syntax error.
Also, (I don't know if this could be related) when I tried loading a shader from a file it filled the console with junk text before crashing)
the full code is the attachment.
I'm using VS2013