Testing OpenGL shader programs has become a lot easier ever since the advent of WebGL technology, and it's implementation across most major web browsers. In the past, developers would have had to write code to initialize an OpenGL rendering context on a display, set up the world and viewport dimensions before writing utility methods or classes (in C++) for compiling, linking and using shader programs.
Luckily, ever since the emergence of WebGL and it's adoption across most web browsers, web applications have appeared such as shadertoy, which allows artists to focus on developing fragment shaders in their web browser.
For those that want to test fragment shader programs natively, that is, within a regular OpenGL rendering context in a window created by the operating system, you can do so with the QML scripting engine provided by Qt's SDK. QML, or Quick Markup Language, is designed for creating user interfaces.
Fragment shader programs are hosted in a fragmentShader attribute, and are modified by ShaderEffect elements, and two neat aspects of them is that they can be nested within UI components, and that accessing uniform variables is pretty easy. In this example code I have animated a property of a fragment shader variable:
The latest Qt SDK containing the qml executable can be retrieved from https://www.qt.io/Share on Twitter Share on Facebook