Last active
December 9, 2015 20:58
-
-
Save kenpower/4327363 to your computer and use it in GitHub Desktop.
Load & Bind a GLSL shader in SFML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sf::Shader shader; //cretae an SFML shader object | |
| //load, compile, link shader code | |
| if(!shader.loadFromFile("vertex.glsl","fragment.glsl")){ | |
| exit(1); //error has occured | |
| } | |
| sf::Shader::bind(&shader); //select this shader for use in the pipeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment