diff --git a/debian/libshadertoy0.install b/debian/libshadertoy0.install
deleted file mode 100644
index 3ddde584198421f0d2a3fef9d36cc110f3b8b76d..0000000000000000000000000000000000000000
--- a/debian/libshadertoy0.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/lib*.so.*
diff --git a/examples/00-build/CMakeLists.txt b/examples/00-build/CMakeLists.txt
deleted file mode 100644
index 988677804c4ca7768762212f1a6037a113af0052..0000000000000000000000000000000000000000
--- a/examples/00-build/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(00-build)
-include(FindPkgConfig)
-
-# GL libraries
-find_package(OpenGL REQUIRED)
-pkg_search_module(glfw3 REQUIRED glfw3)
-pkg_search_module(EPOXY REQUIRED epoxy)
-
-# libshadertoy
-find_package(shadertoy REQUIRED)
-
-include_directories(
-	${OPENGL_INCLUDE_DIRS}
-	${EPOXY_INCLUDE_DIRS}
-	${glfw3_INCLUDE_DIRS})
-
-add_executable(example00-build
-	${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
-
-target_link_libraries(example00-build
-	${OPENGL_LIBRARY}
-	${EPOXY_LIBRARIES}
-	${glfw3_LIBRARIES}
-	shadertoy)
-
-# C++14
-set_property(TARGET example00-build PROPERTY CXX_STANDARD 14)
diff --git a/examples/00-build/README.md b/examples/00-build/README.md
deleted file mode 100644
index 5d2822ab9dd464cfc68707133f7a93cb8a3743c2..0000000000000000000000000000000000000000
--- a/examples/00-build/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# libshadertoy - 00-build
-
-This example is used as a test for the development package. The program only
-initializes the rendering context and then exits with status code 0 if no error
-occurred.
-
-## Dependencies
-
-* libglfw3-dev
-* cmake
-* git
-* g++
-* ca-certificates
-* pkg-config
-
-## Copyright
-
-libshadertoy - Vincent Tavernier <vincent.tavernier@inria.fr>
diff --git a/examples/00-build/main.cpp b/examples/00-build/main.cpp
deleted file mode 100644
index f388bdc5051129e414847766c32f920d1a8d23f0..0000000000000000000000000000000000000000
--- a/examples/00-build/main.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <iostream>
-
-#include <epoxy/gl.h>
-#include <GLFW/glfw3.h>
-
-#include <shadertoy/Shadertoy.hpp>
-
-int main(int argc, char *argv[])
-{
-	int code = 0;
-
-	shadertoy::ContextConfig contextConfig;
-	contextConfig.width = 640;
-	contextConfig.height = 480;
-	contextConfig.targetFramerate = 60.0;
-
-	if (!glfwInit())
-	{
-		std::cerr << "Failed to initialize glfw" << std::endl;
-		return 1;
-	}
-
-	// Initialize window
-	GLFWwindow *window = glfwCreateWindow(contextConfig.width,
-										  contextConfig.height,
-										  "libshadertoy example 00-build",
-										  nullptr,
-										  nullptr);
-
-	if (!window)
-	{
-		std::cerr << "Failed to create glfw window" << std::endl;
-		code = 1;
-	}
-	else
-	{
-		glfwMakeContextCurrent(window);
-
-		{
-			shadertoy::RenderContext context(contextConfig);
-			std::cout << "Created context based on config" << std::endl;
-		}
-
-		glfwDestroyWindow(window);
-	}
-
-	glfwTerminate();
-	return code;
-}
diff --git a/examples/10-gradient/CMakeLists.txt b/examples/10-gradient/CMakeLists.txt
deleted file mode 100644
index f2ae6952d1ca191db21b64c64d35e2a1756e0573..0000000000000000000000000000000000000000
--- a/examples/10-gradient/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(10-gradient)
-include(FindPkgConfig)
-
-# GL libraries
-find_package(OpenGL REQUIRED)
-pkg_search_module(glfw3 REQUIRED glfw3)
-pkg_search_module(EPOXY REQUIRED epoxy)
-
-# libshadertoy
-find_package(shadertoy REQUIRED)
-
-include_directories(
-	${OPENGL_INCLUDE_DIRS}
-	${EPOXY_INCLUDE_DIRS}
-	${glfw3_INCLUDE_DIRS})
-
-add_executable(example10-gradient
-	${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
-
-target_link_libraries(example10-gradient
-	${OPENGL_LIBRARY}
-	${EPOXY_LIBRARIES}
-	${glfw3_LIBRARIES}
-	shadertoy)
-
-# C++14
-set_property(TARGET example10-gradient PROPERTY CXX_STANDARD 14)
diff --git a/examples/10-gradient/README.md b/examples/10-gradient/README.md
deleted file mode 100644
index 95b28f7e873107e07d5a932504dedca14aa82fc3..0000000000000000000000000000000000000000
--- a/examples/10-gradient/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# libshadertoy - 10-gradient
-
-This example shows how the *gradient* default shadertoy can be rendered using
-libshadertoy.
-
-## Dependencies
-
-* libglfw3-dev
-* cmake
-* git
-* g++
-* ca-certificates
-* pkg-config
-
-## Copyright
-
-libshadertoy - Vincent Tavernier <vincent.tavernier@inria.fr>
diff --git a/examples/10-gradient/main.cpp b/examples/10-gradient/main.cpp
deleted file mode 100644
index acc861ece11f2991c988c828a437b3d03a2f81bf..0000000000000000000000000000000000000000
--- a/examples/10-gradient/main.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-#include <epoxy/gl.h>
-#include <GLFW/glfw3.h>
-#include <boost/filesystem.hpp>
-#include <iostream>
-
-#include <shadertoy/Shadertoy.hpp>
-
-namespace fs = boost::filesystem;
-using shadertoy::OpenGL::glCall;
-
-void SetFramebufferSize(GLFWwindow *window, int width, int height)
-{
-	// Get the context from the window user pointer
-	shadertoy::RenderContext &context =
-		*static_cast<shadertoy::RenderContext*>(glfwGetWindowUserPointer(window));
-
-	// Reallocate textures
-	context.GetConfig().width = width;
-	context.GetConfig().height = height;
-	context.AllocateTextures();
-}
-
-int main(int argc, char *argv[])
-{
-	int code = 0;
-
-	shadertoy::ContextConfig contextConfig;
-	contextConfig.width = 640;
-	contextConfig.height = 480;
-	contextConfig.targetFramerate = 60.0;
-
-	shadertoy::BufferConfig imageBuffer;
-	imageBuffer.name = "image";
-	imageBuffer.shaderFiles.push_back(fs::path("..") / fs::path("shader.glsl"));
-
-	contextConfig.bufferConfigs.insert(make_pair(imageBuffer.name,
-												 imageBuffer));
-
-	if (!glfwInit())
-	{
-		std::cerr << "Failed to initialize glfw" << std::endl;
-		return 1;
-	}
-
-	// Initialize window
-	GLFWwindow *window = glfwCreateWindow(contextConfig.width,
-										  contextConfig.height,
-										  "libshadertoy example 10-gradient",
-										  nullptr,
-										  nullptr);
-
-	if (!window)
-	{
-		std::cerr << "Failed to create glfw window" << std::endl;
-		code = 1;
-	}
-	else
-	{
-		glfwMakeContextCurrent(window);
-		glfwSwapInterval(1);
-
-		{
-			shadertoy::RenderContext context(contextConfig);
-			std::cout << "Created context based on config" << std::endl;
-
-			try
-			{
-				// Initialize context
-				context.Initialize();
-				std::cout << "Initialized rendering context" << std::endl;
-			}
-			catch (shadertoy::OpenGL::ShaderCompilationError &sce)
-			{
-				std::cerr << "Failed to compile shader: " << sce.log();
-				code = 2;
-			}
-			catch (shadertoy::ShadertoyError &err)
-			{
-				std::cerr << "Error: "
-						  << err.what();
-				code = 2;
-			}
-
-			if (code)
-				exit(code);
-
-			// Now render for 5s
-			int frameCount = 0;
-			double t = 0.;
-
-			// Set the resize callback
-			glfwSetWindowUserPointer(window, &context);
-			glfwSetFramebufferSizeCallback(window, SetFramebufferSize);
-
-			while (!glfwWindowShouldClose(window))
-			{
-				// Poll events
-				glfwPollEvents();
-
-				// Update uniforms
-				context.GetState().V<shadertoy::iTime>() = t;
-				context.GetState().V<shadertoy::iFrame>() = frameCount;
-
-				// Render to texture
-				context.Render();
-
-				// Render to screen
-				//  Setup framebuffer
-				glCall(glBindFramebuffer, GL_DRAW_FRAMEBUFFER, 0);
-				glCall(glViewport, 0, 0, contextConfig.width, contextConfig.height);
-
-				//  Load texture and program
-				context.BindResult();
-
-				//  Render result
-				context.RenderScreenQuad();
-
-				// Buffer swapping
-				glfwSwapBuffers(window);
-
-				// Update time and framecount
-				t = glfwGetTime();
-				frameCount++;
-
-				if (t > 5.)
-					glfwSetWindowShouldClose(window, true);
-			}
-		}
-
-		glfwDestroyWindow(window);
-	}
-
-	glfwTerminate();
-	return code;
-}
diff --git a/examples/10-gradient/shader.glsl b/examples/10-gradient/shader.glsl
deleted file mode 100644
index e0aa1f3eab88233e10df2a8d78e811906291667e..0000000000000000000000000000000000000000
--- a/examples/10-gradient/shader.glsl
+++ /dev/null
@@ -1,5 +0,0 @@
-void mainImage( out vec4 fragColor, in vec2 fragCoord )
-{
-	vec2 uv = fragCoord.xy / iResolution.xy;
-	fragColor = vec4(uv,0.5+0.5*sin(iTime),1.0);
-}
diff --git a/examples/15-uniforms/CMakeLists.txt b/examples/15-uniforms/CMakeLists.txt
deleted file mode 100644
index 986ac33ed79d0caab77b8e17338b0de1cbaa1608..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(15-uniforms)
-include(FindPkgConfig)
-
-# GL libraries
-find_package(OpenGL REQUIRED)
-pkg_search_module(glfw3 REQUIRED glfw3)
-pkg_search_module(EPOXY REQUIRED epoxy)
-
-# libshadertoy
-find_package(shadertoy REQUIRED)
-
-include_directories(
-	${OPENGL_INCLUDE_DIRS}
-	${EPOXY_INCLUDE_DIRS}
-	${glfw3_INCLUDE_DIRS})
-
-add_executable(example15-uniforms
-	${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
-	${CMAKE_CURRENT_SOURCE_DIR}/uniforms.cpp)
-
-target_link_libraries(example15-uniforms
-	${OPENGL_LIBRARY}
-	${EPOXY_LIBRARIES}
-	${glfw3_LIBRARIES}
-	shadertoy)
-
-# C++14
-set_property(TARGET example15-uniforms PROPERTY CXX_STANDARD 14)
diff --git a/examples/15-uniforms/README.md b/examples/15-uniforms/README.md
deleted file mode 100644
index ca28e881e1c83f78905072d4469d19e013a133e6..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# libshadertoy - 15-uniforms
-
-This example shows how to use custom uniforms defined at runtime
-with a custom shader, using libshadertoy.
-
-## Dependencies
-
-* libglfw3-dev
-* cmake
-* git
-* g++
-* ca-certificates
-* pkg-config
-
-## Copyright
-
-libshadertoy - Vincent Tavernier <vincent.tavernier@inria.fr>
diff --git a/examples/15-uniforms/main.cpp b/examples/15-uniforms/main.cpp
deleted file mode 100644
index 92b5ff26189fcf07707d995f7f00dd7c3437b49d..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/main.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-#include <epoxy/gl.h>
-
-#include <GLFW/glfw3.h>
-
-#include <boost/filesystem.hpp>
-#include <iostream>
-
-#include <shadertoy/Shadertoy.hpp>
-
-#include "uniforms.hpp"
-
-namespace fs = boost::filesystem;
-using shadertoy::OpenGL::glCall;
-
-// Create a ShaderInputs type, which references the custom
-// uniforms (either static, known at compile time, or dynamic, defined at
-// runtime)
-typedef shadertoy::ShaderInputs<
-	iDynamicFloats
-> ExampleInputsType;
-
-// Create a custom render context that uses the extra input state
-class ExampleRenderContext : public shadertoy::RenderContext {
-	// Declare the variable holding the extra uniform state
-	ExampleInputsType extraInputs;
-
-	// Add auto-generated wrapper to the sources of all compiled programs
-	void LoadBufferSources(std::vector<std::pair<std::string, std::string>> &sources) override
-	{
-		sources.push_back(std::make_pair(
-			std::string("internal:example-uniforms"),
-			extraInputs.GetDefinitions()
-		));
-	}
-
-	// After compiling a program, bind the inputs from the extra state into the program
-	void BindInputs(std::vector<std::shared_ptr<shadertoy::BoundInputsBase>> &inputs,
-		shadertoy::OpenGL::Program &program) override
-	{
-		inputs.push_back(extraInputs.GetBoundInputs(program));
-	}
-
-public:
-	// Extra state accessor
-	ExampleInputsType &ExtraInputs() { return extraInputs; }
-
-	ExampleRenderContext(shadertoy::ContextConfig &config)
-		: shadertoy::RenderContext(config),
-		extraInputs()
-	{
-		// Add a custom runtime input
-		extraInputs.V<iDynamicFloats>().Add<float>("iCustomTime", 0.0f);
-	}
-};
-
-void SetFramebufferSize(GLFWwindow *window, int width, int height)
-{
-	// Get the context from the window user pointer
-	shadertoy::RenderContext &context =
-		*static_cast<shadertoy::RenderContext*>(glfwGetWindowUserPointer(window));
-
-	// Reallocate textures
-	context.GetConfig().width = width;
-	context.GetConfig().height = height;
-	context.AllocateTextures();
-}
-
-int main(int argc, char *argv[])
-{
-	int code = 0;
-
-	shadertoy::ContextConfig contextConfig;
-	contextConfig.width = 640;
-	contextConfig.height = 480;
-	contextConfig.targetFramerate = 60.0;
-
-	shadertoy::BufferConfig imageBuffer;
-	imageBuffer.name = "image";
-	imageBuffer.shaderFiles.push_back(fs::path("..") / fs::path("shader.glsl"));
-
-	contextConfig.bufferConfigs.insert(make_pair(imageBuffer.name,
-												 imageBuffer));
-
-	if (!glfwInit())
-	{
-		std::cerr << "Failed to initialize glfw" << std::endl;
-		return 1;
-	}
-
-	// Initialize window
-	GLFWwindow *window = glfwCreateWindow(contextConfig.width,
-										  contextConfig.height,
-										  "libshadertoy example 10-gradient",
-										  nullptr,
-										  nullptr);
-
-	if (!window)
-	{
-		std::cerr << "Failed to create glfw window" << std::endl;
-		code = 1;
-	}
-	else
-	{
-		glfwMakeContextCurrent(window);
-		glfwSwapInterval(1);
-
-		{
-			ExampleRenderContext context(contextConfig);
-			std::cout << "Created context based on config" << std::endl;
-
-			try
-			{
-				// Initialize context
-				context.Initialize();
-				std::cout << "Initialized rendering context" << std::endl;
-			}
-			catch (shadertoy::OpenGL::ShaderCompilationError &sce)
-			{
-				std::cerr << "Failed to compile shader: " << sce.log();
-				code = 2;
-			}
-			catch (shadertoy::ShadertoyError &err)
-			{
-				std::cerr << "Error: "
-						  << err.what();
-				code = 2;
-			}
-
-			if (code)
-				exit(code);
-
-			// Now render for 5s
-			int frameCount = 0;
-			double t = 0.;
-
-			// Set the resize callback
-			glfwSetWindowUserPointer(window, &context);
-			glfwSetFramebufferSizeCallback(window, SetFramebufferSize);
-
-			while (!glfwWindowShouldClose(window))
-			{
-				// Poll events
-				glfwPollEvents();
-
-				// Update uniforms
-				context.GetState().V<shadertoy::iTime>() = t;
-				context.GetState().V<shadertoy::iFrame>() = frameCount;
-
-				// Update custom uniform
-				context.ExtraInputs().V<iDynamicFloats>().Get<float>("iCustomTime") = (int(t) % 2) == 0 ? 1.0f : 0.0f;
-
-				// Render to texture
-				context.Render();
-
-				// Render to screen
-				//  Setup framebuffer
-				glCall(glBindFramebuffer, GL_DRAW_FRAMEBUFFER, 0);
-				glCall(glViewport, 0, 0, contextConfig.width, contextConfig.height);
-
-				//  Load texture and program
-				context.BindResult();
-
-				//  Render result
-				context.RenderScreenQuad();
-
-				// Buffer swapping
-				glfwSwapBuffers(window);
-
-				// Update time and framecount
-				t = glfwGetTime();
-				frameCount++;
-
-				if (t > 5.)
-					glfwSetWindowShouldClose(window, true);
-			}
-		}
-
-		glfwDestroyWindow(window);
-	}
-
-	glfwTerminate();
-	return code;
-}
diff --git a/examples/15-uniforms/shader.glsl b/examples/15-uniforms/shader.glsl
deleted file mode 100644
index 9300ae2416094a2f0b408f8376bd99839cb79978..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/shader.glsl
+++ /dev/null
@@ -1,5 +0,0 @@
-void mainImage( out vec4 fragColor, in vec2 fragCoord )
-{
-	vec2 uv = fragCoord.xy / iResolution.xy;
-	fragColor = vec4(uv,0.5+0.5*sin(iCustomTime),1.0);
-}
diff --git a/examples/15-uniforms/uniforms.cpp b/examples/15-uniforms/uniforms.cpp
deleted file mode 100644
index f6cead3f0548f2cd78a67504b18670a27d90677b..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/uniforms.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <epoxy/gl.h>
-
-#include <GLFW/glfw3.h>
-
-#include <shadertoy/Shadertoy.hpp>
-
-#include "uniforms.hpp"
-
-#define IMPLEMENT_UNIFORM_STATE
-#include "uniforms.hpp"
diff --git a/examples/15-uniforms/uniforms.hpp b/examples/15-uniforms/uniforms.hpp
deleted file mode 100644
index 387a1bc1cd98ad193ec1a374e03f26a264efea1b..0000000000000000000000000000000000000000
--- a/examples/15-uniforms/uniforms.hpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "shadertoy/UniformState_decl.hpp"
-
-DECLARE_DYNAMIC_UNIFORM(iDynamicFloats, float, glm::vec2, glm::vec3, glm::vec4);
diff --git a/examples/50-shadertoy/CMakeLists.txt b/examples/50-shadertoy/CMakeLists.txt
deleted file mode 100644
index 34965549488c20bc0d2982b9982915e71ecad2e1..0000000000000000000000000000000000000000
--- a/examples/50-shadertoy/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(50-shadertoy)
-include(FindPkgConfig)
-
-# GL libraries
-find_package(OpenGL REQUIRED)
-find_package(Boost 1.58 REQUIRED COMPONENTS filesystem log serialization
-	date_time program_options)
-find_package(CURL REQUIRED)
-pkg_search_module(glfw3 REQUIRED glfw3)
-pkg_search_module(jsoncpp REQUIRED jsoncpp)
-pkg_search_module(EPOXY REQUIRED epoxy)
-
-# libshadertoy
-find_package(shadertoy REQUIRED)
-
-include_directories(
-	${OPENGL_INCLUDE_DIRS}
-	${EPOXY_INCLUDE_DIRS}
-	${glfw3_INCLUDE_DIRS}
-	${Boost_INCLUDE_DIRS}
-	${CURL_INCLUDE_DIRS}
-	${jsoncpp_INCLUDE_DIRS})
-
-add_executable(example50-shadertoy
-	${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
-
-target_link_libraries(example50-shadertoy
-	${OPENGL_LIBRARY}
-	${EPOXY_LIBRARIES}
-	${glfw3_LIBRARIES}
-	${Boost_LIBRARIES}
-	${CURL_LIBRARIES}
-	${jsoncpp_LIBRARIES}
-	shadertoy)
-
-# C++14
-set_property(TARGET example50-shadertoy PROPERTY CXX_STANDARD 14)
diff --git a/examples/50-shadertoy/README.md b/examples/50-shadertoy/README.md
deleted file mode 100644
index 9525274ad2825a4ee02443d73e05bfcf64e280bf..0000000000000000000000000000000000000000
--- a/examples/50-shadertoy/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# libshadertoy - 50-shadertoy
-
-This example implements a desktop version of ShaderToy using the implemented
-functionality in libshadertoy. Note that in order to support progressive JPEG
-(not supported by SOIL).
-
-## Example of invocation
-
-```bash
-./example50-shadertoy -i ltfSDl -a fdnKWn
-```
-
-## Tested shaders
-
-* [ltfSDl](https://www.shadertoy.com/view/ltfSDl): no sound support
-* [ldl3z2](https://www.shadertoy.com/view/ldl3z2)
-* [XsfXW8](https://www.shadertoy.com/view/XsfXW8): no keyboard support
-* [lljSDy](https://www.shadertoy.com/view/lljSDy)
-* [ldlSzX](https://www.shadertoy.com/view/ldlSzX): no keyboard support
-* [4sl3RX](https://www.shadertoy.com/view/4sl3RX): shaking seems stronger on desktop?
-* [MsfXzM](https://www.shadertoy.com/view/MsfXzM): all black, no keyboard support
-* [4tfSzS](https://www.shadertoy.com/view/4tfSzS)
-* [4dGGz1](https://www.shadertoy.com/view/4dGGz1): no keyboard support
-* [lt33zl](https://www.shadertoy.com/view/lt33zl)
-
-## Dependencies
-
-* libcurl4-openssl-dev
-* libjsoncpp-dev
-* libboost-all-dev
-* libglfw3-dev
-* cmake
-* git
-* g++
-* ca-certificates
-* pkg-config
-
-## Copyright
-
-libshadertoy - Vincent Tavernier <vincent.tavernier@inria.fr>
diff --git a/examples/50-shadertoy/main.cpp b/examples/50-shadertoy/main.cpp
deleted file mode 100644
index 98a94b77e716f2a89b5e269ca64d4d2e805205c5..0000000000000000000000000000000000000000
--- a/examples/50-shadertoy/main.cpp
+++ /dev/null
@@ -1,471 +0,0 @@
-#include <iostream>
-#include <string>
-#include <sstream>
-
-#include <curl/curl.h>
-#include <json/json.h>
-
-#include <epoxy/gl.h>
-#include <GLFW/glfw3.h>
-
-#include <boost/log/trivial.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/program_options.hpp>
-
-#include <shadertoy/Shadertoy.hpp>
-
-using namespace std;
-using shadertoy::OpenGL::glCall;
-
-namespace fs = boost::filesystem;
-namespace po = boost::program_options;
-
-struct MyContext
-{
-	shadertoy::RenderContext *context;
-};
-
-void KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
-{
-	// Close on ESC key press
-	if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
-	{
-		glfwSetWindowShouldClose(window, true);
-	}
-}
-
-void FramebufferSizeCallback(GLFWwindow *window, int width, int height)
-{
-	// Get the context from the window user pointer
-	MyContext &ctx = *static_cast<MyContext*>(glfwGetWindowUserPointer(window));
-
-	// Reallocate textures
-	ctx.context->GetConfig().width = width;
-	ctx.context->GetConfig().height = height;
-	ctx.context->AllocateTextures();
-}
-
-size_t curl_write_data(char *buffer, size_t size, size_t nmemb, void *userp)
-{
-	ostream &ss = *static_cast<ostream*>(userp);
-	size_t sz = size * nmemb;
-	ss.write(buffer, sz);
-	return sz;
-}
-
-void file_get(CURL *curl, const string &url, const fs::path &dst)
-{
-	ofstream ofs(dst.string());
-
-	curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
-	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data);
-	curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ofs);
-
-	CURLcode res = curl_easy_perform(curl);
-	if (res != CURLE_OK)
-	{
-		throw runtime_error(curl_easy_strerror(res));
-	}
-}
-
-stringstream curl_get(CURL *curl, const string &url)
-{
-	stringstream ss;
-
-	curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
-	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data);
-	curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ss);
-
-	CURLcode res = curl_easy_perform(curl);
-	if (res != CURLE_OK)
-	{
-		throw runtime_error(curl_easy_strerror(res));
-	}
-
-	return ss;
-}
-
-Json::Value json_get(CURL *curl, const string &url)
-{
-	Json::Value result;
-	curl_get(curl, url) >> result;
-	return result;
-}
-
-int parseOptions(string &shaderId, string &shaderApiKey, bool &dump, int argc, char *argv[])
-{
-	// Read and parse options
-	bool help;
-	po::options_description desc("libshadertoy 50-shadertoy example");
-	desc.add_options()
-		("help,h", po::bool_switch(&help)->default_value(false), "show a help message")
-		("dump,d", po::bool_switch(&dump)->default_value(false), "Dump binary formats of the loaded programs")
-		("id,i", po::value<string>(&shaderId)->required(), "ID of the ShaderToy to render")
-		("api,a", po::value<string>(&shaderApiKey)->required(), "API key for ShaderToy query");
-
-	po::variables_map vm;
-
-	try
-	{
-		po::store(po::command_line_parser(argc, argv).options(desc).run(), vm);
-		po::notify(vm);
-	}
-	catch (po::error &ex)
-	{
-		BOOST_LOG_TRIVIAL(error) << ex.what();
-		return 2;
-	}
-
-	if (help)
-	{
-		cout << desc << endl;
-		return 1;
-	}
-
-	return 0;
-}
-
-int loadRemote(const string &shaderId, const string &shaderApiKey,
-				shadertoy::ContextConfig &contextConfig)
-{
-	// Init CURL
-	curl_global_init(CURL_GLOBAL_DEFAULT);
-	CURL *curl = curl_easy_init();
-
-	if (!curl)
-	{
-		BOOST_LOG_TRIVIAL(error) << "Failed to initialize curl.";
-		curl_global_cleanup();
-		return 1;
-	}
-
-	int code = 0;
-	try
-	{
-		string endpoint =
-			string("https://www.shadertoy.com/api/v1/shaders/") + shaderId +
-			string("?key=") + shaderApiKey;
-		BOOST_LOG_TRIVIAL(info) << "Fetching shader info from " << endpoint;
-		Json::Value shaderSpec = json_get(curl, endpoint);
-
-		// Check errors from ShaderToy
-		if (!shaderSpec["Error"].isNull())
-		{
-			throw runtime_error(shaderSpec["Error"].asString().c_str());
-		}
-
-		ofstream dump(shaderId + string(".json"));
-		dump << shaderSpec;
-		dump.close();
-
-		// Create buffer configs for each render pass
-		for (int i = 0; i < shaderSpec["Shader"]["renderpass"].size(); ++i)
-		{
-			auto &pass(shaderSpec["Shader"]["renderpass"][i]);
-
-			// Create buffer
-			shadertoy::BufferConfig imageBuffer;
-			imageBuffer.name = pass["name"].asString();
-			if (imageBuffer.name.empty())
-				imageBuffer.name = pass["type"].asString();
-
-			// Skip if sound buffer
-			if (pass["type"].asString().compare("sound") == 0)
-			{
-				BOOST_LOG_TRIVIAL(warning) << "Skipping unsupported sound shader.";
-				continue;
-			}
-
-			// Load code
-			stringstream sspath;
-			sspath << shaderId << "-" << i << ".glsl";
-			fs::path p(sspath.str());
-
-			if (!fs::exists(p))
-			{
-				ofstream ofs(p.string());
-				ofs << pass["code"].asString();
-				ofs.close();
-			}
-
-			// Load inputs
-			for (int j = 0; j < pass["inputs"].size(); ++j)
-			{
-				auto &input(pass["inputs"][j]);
-				auto &conf(imageBuffer.inputConfig[input["channel"].asInt()]);
-				auto &sampler(input["sampler"]);
-
-				stringstream ssname;
-				ssname << imageBuffer.name << "." << input["channel"].asInt();
-				conf.id = ssname.str();
-
-				if (sampler["filter"].compare("mipmap") == 0)
-				{
-					conf.minFilter = GL_LINEAR_MIPMAP_LINEAR;
-					conf.magFilter = GL_LINEAR;
-				}
-				else if (sampler["filter"].compare("linear") == 0)
-				{
-					conf.minFilter = GL_LINEAR;
-					conf.magFilter = GL_LINEAR;
-				}
-				else if (sampler["filter"].compare("nearest") == 0)
-				{
-					conf.minFilter = GL_NEAREST;
-					conf.magFilter = GL_NEAREST;
-				}
-
-				if (sampler["wrap"].compare("repeat") == 0)
-				{
-					conf.wrap = GL_REPEAT;
-				}
-				else if (sampler["wrap"].compare("clamp") == 0)
-				{
-					conf.wrap = GL_CLAMP_TO_EDGE;
-				}
-
-				conf.vflip = sampler["vflip"].compare("true") == 0;
-
-				if (input["ctype"].compare("texture") == 0
-					|| input["ctype"].compare("cubemap") == 0)
-				{
-					conf.type = "texture";
-
-					fs::path srcpath(input["src"].asString());
-					string url =
-						string("https://www.shadertoy.com")
-						+ input["src"].asString();
-					fs::path dstpath(srcpath.filename());
-
-					if (!fs::exists(dstpath))
-					{
-						BOOST_LOG_TRIVIAL(info) << "Downloading " << url;
-						file_get(curl, url, dstpath);
-					}
-					else
-					{
-						BOOST_LOG_TRIVIAL(info) << "Using cache for " << url;
-					}
-
-					conf.source = dstpath.string();
-				}
-				else if (input["ctype"].compare("buffer") == 0)
-				{
-					conf.type = "buffer";
-					conf.source = "Buf A";
-					conf.source.back() = 'A' + (input["id"].asInt() - 257);
-
-					BOOST_LOG_TRIVIAL(debug) <<
-						"Pass " << i << ", input " << input["channel"].asInt()
-						<< ": binding " << conf.source << " buffer " <<
-						conf.enabled();
-				}
-				else
-				{
-					stringstream ss;
-					ss << "Unsupported input " << input["ctype"].asString()
-					   << " for pass " << i << ", input " << input["channel"].asInt();
-
-					BOOST_LOG_TRIVIAL(warning) << ss.str();
-				}
-			}
-
-			// Add to context
-			imageBuffer.shaderFiles.push_back(p);
-			contextConfig.bufferConfigs.insert(make_pair(imageBuffer.name,
-														 imageBuffer));
-		}
-
-		// Image buffer should be last
-		pair<string, shadertoy::BufferConfig> imagebuf(*contextConfig.bufferConfigs.begin());
-		contextConfig.bufferConfigs.erase(contextConfig.bufferConfigs.begin());
-		contextConfig.bufferConfigs.insert(imagebuf);
-	}
-	catch (exception &ex)
-	{
-		BOOST_LOG_TRIVIAL(error) << ex.what();
-		code = 1;
-	}
-
-	// Free CURL
-	curl_easy_cleanup(curl);
-	curl_global_cleanup();
-
-	return code;
-}
-
-int render(GLFWwindow* window, shadertoy::ContextConfig &contextConfig)
-{
-	int code = 0;
-
-	shadertoy::RenderContext context(contextConfig);
-	auto &state(context.GetState());
-	MyContext ctx = {&context};
-
-	try
-	{
-		// Initialize context
-		context.Initialize();
-		BOOST_LOG_TRIVIAL(info) << "Initialized rendering context";
-	}
-	catch (shadertoy::OpenGL::ShaderCompilationError &sce)
-	{
-		std::cerr << "Failed to compile shader: " << sce.log();
-		code = 2;
-	}
-	catch (shadertoy::ShadertoyError &err)
-	{
-		std::cerr << "Error: "
-				  << err.what();
-		code = 2;
-	}
-
-	if (code == 0)
-	{
-		// Now render for 5s
-		int frameCount = 0;
-
-		// Set the resize callback
-		glfwSetWindowUserPointer(window, &ctx);
-
-		glfwSetKeyCallback(window, KeyCallback);
-		glfwSetFramebufferSizeCallback(window, FramebufferSizeCallback);
-
-		while (!glfwWindowShouldClose(window))
-		{
-			// Poll events
-			glfwPollEvents();
-
-			// Update uniforms
-			//  iTime and iFrame
-			state.V<shadertoy::iTime>() += 1.0 / contextConfig.targetFramerate;
-			state.V<shadertoy::iFrame>() = frameCount;
-
-			//  iDate
-			boost::posix_time::ptime dt = boost::posix_time::microsec_clock::local_time();
-			state.V<shadertoy::iDate>() = glm::vec4(dt.date().year() - 1,
-											dt.date().month(),
-											dt.date().day(),
-											dt.time_of_day().total_nanoseconds() / 1e9f);
-
-			//  iMouse
-			int btnstate = glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT);
-			if (btnstate == GLFW_PRESS)
-			{
-				double xpos, ypos;
-				glfwGetCursorPos(window, &xpos, &ypos);
-
-				state.V<shadertoy::iMouse>()[0] =
-					state.V<shadertoy::iMouse>()[2] = xpos;
-				state.V<shadertoy::iMouse>()[1] =
-					state.V<shadertoy::iMouse>()[3] = contextConfig.height - ypos;
-			}
-			else
-			{
-				state.V<shadertoy::iMouse>()[2] =
-					state.V<shadertoy::iMouse>()[3] = 0.f;
-			}
-			// End update uniforms
-
-			// Render to texture
-			context.Render();
-
-			// Render to screen
-			//  Setup framebuffer
-			glCall(glBindFramebuffer, GL_DRAW_FRAMEBUFFER, 0);
-			glCall(glViewport, 0, 0, contextConfig.width, contextConfig.height);
-
-			//  Load texture and program
-			context.BindResult();
-
-			//  Render result
-			context.RenderScreenQuad();
-
-			// Print execution time
-			auto buffer = context.GetBufferByName();
-
-			if (buffer)
-			{
-				auto renderTime = buffer->GetElapsedTime();
-				std::cerr << "frame time: " << renderTime
-						  << "ns fps: " << (1e9 / renderTime)
-						  << " mpx/s: " << (contextConfig.width * contextConfig.height / (renderTime / 1e3))
-						  << std::endl;
-			}
-
-			// Buffer swapping
-			glfwSwapBuffers(window);
-
-			// Update time and framecount
-			frameCount++;
-		}
-	}
-
-	return code;
-}
-
-int performRender(shadertoy::ContextConfig &contextConfig)
-{
-	int code = 0;
-
-	if (!glfwInit())
-	{
-		BOOST_LOG_TRIVIAL(error) << "Failed to initialize glfw";
-		return 1;
-	}
-
-	// Initialize window
-	GLFWwindow *window = glfwCreateWindow(contextConfig.width,
-										  contextConfig.height,
-										  "libshadertoy example 50-shadertoy",
-										  nullptr,
-										  nullptr);
-
-	if (!window)
-	{
-		BOOST_LOG_TRIVIAL(error) << "Failed to create glfw window";
-		glfwTerminate();
-		return 1;
-	}
-
-	glfwMakeContextCurrent(window);
-	glfwSwapInterval(1);
-
-	code = render(window, contextConfig);
-
-	glfwDestroyWindow(window);
-	glfwTerminate();
-	return code;
-}
-
-int main(int argc, char *argv[])
-{
-	int code = 0;
-
-	// Options
-	string shaderId, shaderApiKey;
-	bool dumpShaders;
-
-	// Parse options from ARGV
-	code = parseOptions(shaderId, shaderApiKey, dumpShaders, argc, argv);
-	if (code > 0)
-		return code;
-
-	// Context configuration
-	shadertoy::ContextConfig contextConfig;
-	contextConfig.width = 640;
-	contextConfig.height = 480;
-	contextConfig.targetFramerate = 60.0;
-	contextConfig.dumpShaders = dumpShaders;
-
-	// Fetch shader code
-	code = loadRemote(shaderId, shaderApiKey, contextConfig);
-	if (code > 0)
-		return code;
-
-	// Render
-	code = performRender(contextConfig);
-
-	return code;
-}
diff --git a/examples/50-shadertoy/shader.glsl b/examples/50-shadertoy/shader.glsl
deleted file mode 100644
index e0aa1f3eab88233e10df2a8d78e811906291667e..0000000000000000000000000000000000000000
--- a/examples/50-shadertoy/shader.glsl
+++ /dev/null
@@ -1,5 +0,0 @@
-void mainImage( out vec4 fragColor, in vec2 fragCoord )
-{
-	vec2 uv = fragCoord.xy / iResolution.xy;
-	fragColor = vec4(uv,0.5+0.5*sin(iTime),1.0);
-}
diff --git a/include/shadertoy/BufferConfig.hpp b/include/shadertoy/BufferConfig.hpp
deleted file mode 100644
index 1c80c4bae7e80611b3d843b82c5ed2e960131647..0000000000000000000000000000000000000000
--- a/include/shadertoy/BufferConfig.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _SHADERTOY_BUFFER_CONFIG_HPP_
-#define _SHADERTOY_BUFFER_CONFIG_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief      Represents the configuration of a ToyBuffer channel input
- */
-struct shadertoy_EXPORT InputConfig
-{
-	/// Input identifier, in the form <buffer>.<input-id>
-	std::string id;
-
-	/// Type of the actual input
-	std::string type;
-
-	/// Source for this input (texture path, or procedural parameters)
-	std::string source;
-
-	/// true to flip vertically when loading texture
-	bool vflip;
-
-	/// Texture wrap mode
-	GLint wrap;
-
-	/// Texture minification filtering mode
-	GLint minFilter;
-
-	/// Texture magnification filtering mode
-	GLint magFilter;
-
-	/**
-	 * @brief      Returns a value indicating if this input is enabled
-	 *
-	 * @return     true if this input is enabled
-	 */
-	bool enabled() const;
-
-	/**
-	 * @brief      Initialize an empty input config
-	 */
-	InputConfig();
-};
-
-/**
- * @brief      Represents the configuration of a ToyBuffer
- */
-struct shadertoy_EXPORT BufferConfig
-{
-	/// Name of the current buffer
-	std::string name;
-
-	/// Path to the shader files to load
-	std::vector<boost::filesystem::path> shaderFiles;
-
-	/// Specification of inputs for this buffer
-	InputConfig inputConfig[4];
-};
-
-}
-
-#endif /* _SHADERTOY_BUFFER_CONFIG_HPP_ */
diff --git a/include/shadertoy/ContextConfig.hpp b/include/shadertoy/ContextConfig.hpp
deleted file mode 100644
index eacc6a5b12bc90e7fb20a2db66e44fa35d1917c7..0000000000000000000000000000000000000000
--- a/include/shadertoy/ContextConfig.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _SHADERTOY_CONTEXT_CONFIG_HPP_
-#define _SHADERTOY_CONTEXT_CONFIG_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief      Holds the configuration for a ShaderToy rendering context.
- */
-struct shadertoy_EXPORT ContextConfig
-{
-	/// Width of the rendering
-	int width;
-
-	/// Height of the rendering
-	int height;
-
-	/// Target framerate for the rendering (in frames per second)
-	double targetFramerate;
-
-	/// List of pre-processor definitions to be compiled with the programs
-	std::vector<std::pair<std::string, std::string>> preprocessorDefines;
-
-	/// List of configured buffers for this context
-	std::map<std::string, BufferConfig> bufferConfigs;
-
-	/// True if binary versions of the compiled shaders should be dumped
-	bool dumpShaders;
-};
-}
-
-#endif /* _SHADERTOY_CONTEXT_CONFIG_HPP_ */
diff --git a/include/shadertoy/OpenGL/Buffer.hpp b/include/shadertoy/OpenGL/Buffer.hpp
deleted file mode 100644
index c35e43c55151f92c3dc415e5e6a70e773408d547..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Buffer.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_BUFFER_HPP_
-#define _SHADERTOY_OPENGL_BUFFER_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to obtain the id of a null buffer.
-	 */
-	class shadertoy_EXPORT NullBufferError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullBufferError class.
-		 */
-		explicit NullBufferError();
-	};
-
-	/**
-	 * Represents an OpenGL buffer
-	 */
-	class shadertoy_EXPORT Buffer : public Resource<
-		Buffer,
-		MultiAllocator<&glCreateBuffers, &glDeleteBuffers>,
-		NullBufferError>
-	{
-	public:
-		/**
-		 * glBindBuffer
-		 *
-		 * @param target Target to bind this buffer to
-		 *
-		 * @throws OpenGLError
-		 * @throws NullBufferError
-		 */
-		void Bind(GLenum target);
-
-		/**
-		 * glNamedBufferData
-		 * @param size  size of the data to send to the buffer
-		 * @param data  pointer to the data to send to the buffer
-		 * @param usage GL usage for this buffer
-		 *
-		 * @throws OpenGLError
-		 * @throws NullBufferError
-		 */
-		void Data(GLsizei size, const void *data, GLenum usage);
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_BUFFER_HPP_ */
diff --git a/include/shadertoy/OpenGL/Caller.hpp b/include/shadertoy/OpenGL/Caller.hpp
deleted file mode 100644
index 0837d00fa5e9a0caa3cf944f9035143d0a3acf0a..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Caller.hpp
+++ /dev/null
@@ -1,104 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_CALLER_HPP_
-#define _SHADERTOY_OPENGL_CALLER_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an OpenGL operation fails.
-	 */
-	class shadertoy_EXPORT OpenGLError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the OpenGLError class.
-		 *
-		 * @param  error    OpenGL error code
-		 * @param  extraMsg Extra information to include in what()
-		 */
-		explicit OpenGLError(GLenum error, const std::string &extraMsg);
-	};
-
-	/**
-	 * Throws an OpenGLError if glGetError returns non-zero
-	 *
-	 * @throws OpenGLError
-	 */
-	void shadertoy_EXPORT CheckErrors();
-
-	/**
-	 * Invokes the given OpenGL function
-	 *
-	 * @param  function OpenGL function to invoke
-	 *
-	 * @throws OpenGLError
-	 */
-	template<typename glFunction>
-	auto glCall(glFunction function)->typename
-					std::enable_if<std::is_same<void, decltype(function())>::value,
-					decltype(function())>::type
-	{
-		function();
-		CheckErrors();
-	}
-
-	/**
-	 * Invokes the given OpenGL function
-	 *
-	 * @param  function OpenGL function to invoke
-	 * @return          Return value of the OpenGL function
-	 *
-	 * @throws OpenGLError
-	 */
-	template<typename glFunction>
-	auto glCall(glFunction function)->typename
-					std::enable_if<!std::is_same<void, decltype(function())>::value,
-					decltype(function())>::type
-	{
-		auto ret = function();
-		CheckErrors();
-		return ret;
-	}
-
-	/**
-	 * Invokes the given OpenGL function
-	 *
-	 * @param  function OpenGL function to invoke
-	 * @param  params   Parameters to forward to the OpenGL function
-	 *
-	 * @throws OpenGLError
-	 */
-	template<typename glFunction, typename... Params>
-	auto glCall(glFunction function, Params... params)->typename
-					std::enable_if<std::is_same<void, decltype(function(params...))>::value,
-					decltype(function(params...))>::type
-	{
-		function(std::forward<Params>(params)...);
-		CheckErrors();
-	}
-
-	/**
-	 * Invokes the given OpenGL function
-	 *
-	 * @param  function OpenGL function to invoke
-	 * @param  params   Parameters to forward to the OpenGL function
-	 * @return          Return value of the OpenGL function
-	 *
-	 * @throws OpenGLError
-	 */
-	template<typename glFunction, typename... Params>
-	auto glCall(glFunction function, Params... params)->typename
-					std::enable_if<!std::is_same<void, decltype(function(params...))>::value,
-					decltype(function(params...))>::type
-	{
-		auto ret = function(std::forward<Params>(params)...);
-		CheckErrors();
-		return ret;
-	}
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_CALLER_HPP_ */
diff --git a/include/shadertoy/OpenGL/Framebuffer.hpp b/include/shadertoy/OpenGL/Framebuffer.hpp
deleted file mode 100644
index 35758b8922aa8e02eec1231ca30dea668e8f6993..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Framebuffer.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_FRAMEBUFFER_HPP_
-#define _SHADERTOY_OPENGL_FRAMEBUFFER_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to dereference a null framebuffer.
-	 */
-	class shadertoy_EXPORT NullFramebufferError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullFramebufferError class.
-		 */
-		explicit NullFramebufferError();
-	};
-
-	/**
-	 * Represents an OpenGL framebuffer object
-	 */
-	class shadertoy_EXPORT Framebuffer : public Resource<
-		Framebuffer,
-		MultiAllocator<&glCreateFramebuffers, &glDeleteFramebuffers>,
-		NullFramebufferError>
-	{
-	public:
-		/**
-		 * glBindFramebuffer
-		 *
-		 * @param target Target to bind this framebuffer to
-		 *
-		 * @throws OpenGLError
-		 */
-		void Bind(GLenum target);
-
-		/**
-		 * glNamedFramebufferTexture
-		 *
-		 * @param attachment Framebuffer attachment
-		 * @param texture    Texture object to attach
-		 * @param level      Texture level to attach
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void Texture(GLenum attachment, Texture &texture, GLint level);
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_FRAMEBUFFER_HPP_ */
diff --git a/include/shadertoy/OpenGL/OpenGL.hpp b/include/shadertoy/OpenGL/OpenGL.hpp
deleted file mode 100644
index a17e4ddc350144e77a29c0f22df0f6cac3568fac..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/OpenGL.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_OPENGL_HPP_
-#define _SHADERTOY_OPENGL_OPENGL_HPP_
-
-#include "shadertoy/OpenGL/Caller.hpp"
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-#include "shadertoy/OpenGL/Buffer.hpp"
-#include "shadertoy/OpenGL/Framebuffer.hpp"
-#include "shadertoy/OpenGL/Program.hpp"
-#include "shadertoy/OpenGL/Query.hpp"
-#include "shadertoy/OpenGL/Renderbuffer.hpp"
-#include "shadertoy/OpenGL/Shader.hpp"
-#include "shadertoy/OpenGL/Texture.hpp"
-
-#endif
diff --git a/include/shadertoy/OpenGL/Program.hpp b/include/shadertoy/OpenGL/Program.hpp
deleted file mode 100644
index 463d369805fc19b8c18d761449536d8acb3a421f..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Program.hpp
+++ /dev/null
@@ -1,267 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_PROGRAM_HPP_
-#define _SHADERTOY_OPENGL_PROGRAM_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to dereference a null program object.
-	 */
-	class shadertoy_EXPORT NullProgramError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullProgramError class.
-		 */
-		explicit NullProgramError();
-	};
-
-	/**
-	 * Represents the location of an uniform in a program.
-	 */
-	class shadertoy_EXPORT UniformLocation
-	{
-	public:
-		/**
-		 * Initializes a new instance of the UniformLocation class.
-		 *
-		 * @param program  Program this location is defined in
-		 * @param location Location of the uniform
-		 */
-		UniformLocation(const Program &program, GLint location);
-
-		/**
-		 * Returns a value indicating if this uniform location is active in its
-		 * program.
-		 *
-		 * @return true if the uniform is active, false otherwise.
-		 */
-		bool IsActive() const;
-
-		/**
-		 * glProgramUniform1i
-		 *
-		 * @param  v0 v0
-		 * @return    true if the value was set, false otherwise
-		 */
-		bool SetValue(const GLint &v0);
-		/**
-		 * glProgramUniform1f
-		 *
-		 * @param  v0 v0
-		 * @return    true if the value was set, false otherwise
-		 */
-		bool SetValue(const GLfloat &v0);
-		/**
-		 * glProgramUniform2f
-		 *
-		 * @param  v  v0 and v1 as a vec2
-		 * @return    true if the value was set, false otherwise
-		 */
-		bool SetValue(const glm::vec2 &v);
-		/**
-		 * glProgramUniform3f
-		 *
-		 * @param  v  v0 to v2 as a vec3
-		 * @return    true if the value was set, false otherwise
-		 */
-		bool SetValue(const glm::vec3 &v);
-		/**
-		 * glProgramUniform4f
-		 *
-		 * @param  v  v0 to v4 as a vec4
-		 * @return    true if the value was set, false otherwise
-		 */
-		bool SetValue(const glm::vec4 &v);
-
-		/**
-		 * glProgramUniform1iv
-		 *
-		 * @param  count count
-		 * @param  v0    v0
-		 * @return       true if the value was set, false otherwise
-		 */
-		bool SetValue(size_t count, const GLint *v0);
-		/**
-		 * glProgramUniform1fv
-		 *
-		 * @param  count count
-		 * @param  v0    v0
-		 * @return       true if the value was set, false otherwise
-		 */
-		bool SetValue(size_t count, const GLfloat *v0);
-		/**
-		 * glProgramUniform2fv
-		 *
-		 * @param  count count
-		 * @param  v     v0, v1
-		 * @return       true if the value was set, false otherwise
-		 */
-		bool SetValue(size_t count, const glm::vec2 *v);
-		/**
-		 * glProgramUniform3fv
-		 *
-		 * @param  count count
-		 * @param  v     v0, v1, v2
-		 * @return       true if the value was set, false otherwise
-		 */
-		bool SetValue(size_t count, const glm::vec3 *v);
-		/**
-		 * glProgramUniform4fv
-		 *
-		 * @param  count count
-		 * @param  v     v0, v1, v2, v3
-		 * @return       true if the value was set, false otherwise
-		 */
-		bool SetValue(size_t count, const glm::vec4 *v);
-
-	private:
-		/// Program id
-		const GLuint _program;
-		/// Uniform location
-		const GLint _location;
-	};
-
-	/**
-	 * Error thrown when the linking step of a program fails.
-	 */
-	class shadertoy_EXPORT ProgramLinkError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the ProgramLinkError class.
-		 *
-		 * @param  programId OpenGL resource id of the failed program
-		 * @param  log       Contents of the link step log
-		 */
-		explicit ProgramLinkError(GLuint programId, const std::string &log);
-
-		/**
-		 * Get the program id of the failed linking step.
-		 *
-		 * @return Id of the program that failed the linking step.
-		 */
-		GLuint programId() const
-		{ return _programId; }
-
-		/**
-		 * Get the log of the linking step.
-		 *
-		 * @return Contents of the program linking log.
-		 */
-		const std::string &log() const
-		{ return _log; }
-
-	private:
-		/// Program id
-		const GLuint _programId;
-		/// Program link log
-		const std::string _log;
-	};
-
-	/**
-	 * Error thrown when the validation step of a program fails.
-	 */
-	class shadertoy_EXPORT ProgramValidateError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the ProgramValidateError class.
-		 *
-		 * @param  programId OpenGL resource id of the failed program
-		 * @param  log       Contents of the validate step log
-		 */
-		explicit ProgramValidateError(GLuint programId, const std::string &log);
-
-		/**
-		 * Get the program id of the failed validation step.
-		 *
-		 * @return Id of the program that failed the validation step.
-		 */
-		GLuint programId() const
-		{ return _programId; }
-
-		/**
-		 * Get the log of the validation step.
-		 *
-		 * @return Contents of the program validation log.
-		 */
-		const std::string &log() const
-		{ return _log; }
-
-	private:
-		/// Program id
-		const GLuint _programId;
-		/// Program link log
-		const std::string _log;
-	};
-
-	/**
-	 * Represents an OpenGL program.
-	 */
-	class shadertoy_EXPORT Program : public Resource<
-		Program,
-		SingleAllocator<&glCreateProgram, &glDeleteProgram>,
-		NullProgramError>
-	{
-	public:
-		/**
-		 * glLinkProgram
-		 *
-		 * @throws OpenGLError
-		 * @throws ProgramLinkError
-		 */
-		void Link();
-
-		/**
-		 * glUseProgram
-		 *
-		 * @throws OpenGLError
-		 */
-		void Use();
-
-		/**
-		 * glValidateProgram
-		 *
-		 * @throws OpenGLError
-		 * @throws ProgramValidateError
-		 */
-		void Validate();
-
-		/**
-		 * glGetUniformLocation
-		 *
-		 * @param  name Name of the uniform
-		 * @return      Uniform location object that can be used to set the
-		 *              value of this uniform.
-		 *
-		 * @throws OpenGLError
-		 */
-		UniformLocation GetUniformLocation(const GLchar *name);
-
-		/**
-		 * glAttachShader
-		 *
-		 * @param shader Shader object to attach
-		 *
-		 * @throws OpenGLError
-		 * @throws NullShaderError
-		 */
-		void AttachShader(const Shader &shader);
-
-		/**
-		 * glGetProgramInfoLog
-		 *
-		 * @return Contents of the information log
-		 *
-		 * @throws OpenGLError
-		 */
-		std::string Log();
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_PROGRAM_HPP_ */
diff --git a/include/shadertoy/OpenGL/Query.hpp b/include/shadertoy/OpenGL/Query.hpp
deleted file mode 100644
index 5a446d59cd329ee99db15614d29dccb60e57ff58..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Query.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_QUERY_HPP_
-#define _SHADERTOY_OPENGL_QUERY_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to obtain the id of a null query
-	 */
-	class shadertoy_EXPORT NullQueryError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullQueryError class.
-		 */
-		explicit NullQueryError();
-	};
-
-	class shadertoy_EXPORT QueryAllocator
-	{
-	public:
-		/**
-		 * Creates a new query of the given type.
-		 *
-		 * @param  target Target of the query to create
-		 * @return        Id of the created query
-		 *
-		 * @throws OpenGLError
-		 */
-		GLuint Create(GLenum target);
-		/**
-		 * Deletes the given query
-		 *
-		 * @param resource Id of the query to delete
-		 *
-		 * @throws OpenGLError
-		 */
-		void Delete(GLuint resource);
-	};
-
-	/**
-	 * Represents an OpenGL query.
-	 */
-	class shadertoy_EXPORT Query : public Resource<Query, QueryAllocator, NullQueryError>
-	{
-	public:
-		/**
-		 * Creates a new query for the given target.
-		 *
-		 * @param target Target of the new query.
-		 *
-		 * @throws OpenGLError
-		 */
-		Query(GLenum target);
-
-		/**
-		 * glBeginQuery
-		 *
-		 * @param target Query target
-		 */
-		void Begin(GLenum target);
-
-		/**
-		 * glEndQuery
-		 *
-		 * @param target Query target
-		 */
-		static void End(GLenum target);
-
-		/**
-		 * glGetQueryObjectiv
-		 *
-		 * @param pname  Parameter name
-		 * @param params Address to result variable
-		 */
-		void GetObjectiv(GLenum pname, GLint *params);
-
-		/**
-		 * glGetQueryObjectui64v
-		 *
-		 * @param pname  Parameter name
-		 * @param params Address to result variable
-		 */
-		void GetObjectui64v(GLenum pname, GLuint64 *params);
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_QUERY_HPP_ */
diff --git a/include/shadertoy/OpenGL/Renderbuffer.hpp b/include/shadertoy/OpenGL/Renderbuffer.hpp
deleted file mode 100644
index 7b1ded03e2199c35c570e3b68e976522b599772f..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Renderbuffer.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_RENDERBUFFER_HPP_
-#define _SHADERTOY_OPENGL_RENDERBUFFER_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to dereference a null renderbuffer.
-	 */
-	class shadertoy_EXPORT NullRenderbufferError : public shadertoy::ShadertoyError
-	{
-	public:
-		explicit NullRenderbufferError();
-	};
-
-	/**
-	 * Represents an OpenGL Renderbuffer object.
-	 */
-	class shadertoy_EXPORT Renderbuffer : public Resource<
-		Renderbuffer,
-		MultiAllocator<&glCreateRenderbuffers, &glDeleteRenderbuffers>,
-		NullRenderbufferError>
-	{
-	public:
-		/**
-		 * glBindRenderbuffer
-		 *
-		 * @param target Target to bind this renderbuffer to
-		 *
-		 * @throws OpenGLError
-		 * @throws NullRenderbufferError
-		 */
-		void Bind(GLenum target);
-
-		// glNamedRenderbufferStorage
-		/**
-		 * glNamedRenderbufferStorage
-		 *
-		 * @param internalFormat Internal format
-		 * @param width          Width
-		 * @param height         Height
-		 *
-		 * @throws OpenGLError
-		 * @throws NullRenderbufferError
-		 */
-		void Storage(GLenum internalFormat, GLsizei width, GLsizei height);
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_RENDERBUFFER_HPP_ */
diff --git a/include/shadertoy/OpenGL/Resource.hpp b/include/shadertoy/OpenGL/Resource.hpp
deleted file mode 100644
index d9c9818b32ae0f4c97fe92c43361ceecdcafb578..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Resource.hpp
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_RESOURCE_HPP_
-#define _SHADERTOY_OPENGL_RESOURCE_HPP_
-
-#include "shadertoy/pre.hpp"
-#include "shadertoy/OpenGL/Caller.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/// Allocation function that creates single objects
-	typedef GLuint (*SingleResourceCreator)();
-	/// Allocation function that creates multiple objects
-	typedef void (*MultiResourceCreator)(GLsizei, GLuint*);
-
-	/// De-allocation function that frees a single object
-	typedef void (*SingleResourceDeleter)(GLuint);
-	//// De-allocation function that frees multiple objects
-	typedef void (*MultiResourceDeleter)(GLsizei, const GLuint*);
-
-	/**
-	 * Represents a resource that is allocated one by one.
-	 */
-	template<SingleResourceCreator *CreateFunction, SingleResourceDeleter *DeleteFunction>
-	class shadertoy_EXPORT SingleAllocator
-	{
-	public:
-		/**
-		 * Creates the associated resource.
-		 * @return The id of the created resource
-		 * @throws OpenGLError
-		 */
-		GLuint Create()
-		{ return glCall(*CreateFunction); }
-
-		/**
-		 * Deletes the given resource.
-		 * @param resource Resource to delete
-		 * @throws OpenGLError
-		 */
-		void Delete(GLuint resource)
-		{ glCall(*DeleteFunction, resource); }
-	};
-
-	/**
-	 * Represents a resource that is allocated in batches.
-	 */
-	template<MultiResourceCreator *CreateFunction, MultiResourceDeleter *DeleteFunction>
-	class shadertoy_EXPORT MultiAllocator
-	{
-	public:
-		/**
-		 * Creates the associated resource.
-		 * @return The id of the created resource
-		 * @throws OpenGLError
-		 */
-		GLuint Create()
-		{
-			GLuint res;
-			glCall(*CreateFunction, 1, &res);
-			return res;
-		}
-
-		/**
-		 * Deletes the given resource.
-		 * @param resource Resource to delete
-		 * @throws OpenGLError
-		 */
-		void Delete(GLuint resource)
-		{ glCall(*DeleteFunction, 1, &resource); }
-	};
-
-	/**
-	 * Represents an OpenGL resource and manages its lifecycle. Uses move
-	 * semantics, so only one Resource object can be the owner of a
-	 * corresponding OpenGL resource, such as a texture, program, shader, etc.
-	 */
-	template<typename TFinal, typename TAllocator, typename TError>
-	class shadertoy_EXPORT Resource
-	{
-	public:
-		/// Type of the allocator object
-		typedef TAllocator Allocator;
-		/// Type of the null reference error
-		typedef TError ErrorType;
-
-		/**
-		 * Creates a resource using the given allocator.
-		 *
-		 * @throws OpenGLError
-		 */
-		Resource()
-			: hasRes(true),
-			resId(TAllocator().Create())
-		{
-		}
-
-		/**
-		 * Destroys the object referenced by this resource.
-		 *
-		 * @throws OpenGLError
-		 */
-		~Resource()
-		{
-			Free();
-		}
-
-		/**
-		 * Returns true if this resource object holds a reference to a resource.
-		 *
-		 * @return true if this resource object holds a reference to a resource,
-		 *         false otherwise.
-		 */
-		operator bool() const
-		{ return hasRes; }
-
-		/**
-		 * Returns the underlying texture identifier referenced by this texture
-		 * object. Throws an exception if this object does not hold a reference.
-		 *
-		 * @throws TError
-		 */
-		operator GLuint() const throw(TError)
-		{
-			if (!hasRes)
-			{
-				throw TError();
-			}
-
-			return resId;
-		}
-
-		/// Deleted copy constructor
-		Resource(const Resource &) = delete;
-		/// Deleted copy operator
-		Resource &operator=(const Resource &) = delete;
-
-		/**
-		 * Move constructor
-		 * @param other Instance to move
-		 *
-		 * @throws OpenGLError
-		 */
-		Resource(Resource &&other)
-		{
-			this->hasRes = other.hasRes;
-			this->resId = other.resId;
-
-			other.hasRes = false;
-		}
-
-		/**
-		 * Move operator
-		 * @param other Instance to move
-		 *
-		 * @throws OpenGLError
-		 */
-		TFinal &operator=(TFinal &&other)
-		{
-			if (this != &other)
-			{
-				this->Free();
-
-				this->hasRes = other.hasRes;
-				this->resId = other.resId;
-
-				other.hasRes = false;
-			}
-
-			return (*this);
-		}
-
-	protected:
-		/**
-		 * Creates a new resource object from an existing resourceID.
-		 *
-		 * @param  texId Resource id to reference
-		 */
-		explicit Resource(GLuint resId)
-			: hasRes(true),
-			resId(resId)
-		{}
-
-	private:
-		/**
-		 * Destroys the object referenced by this resource.
-		 *
-		 * @throws OpenGLError
-		 */
-		void Free()
-		{
-			if (hasRes)
-			{
-				TAllocator().Delete(resId);
-				hasRes = false;
-			}
-		}
-
-		bool hasRes;
-		GLuint resId;
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_RESOURCE_HPP_ */
diff --git a/include/shadertoy/OpenGL/Shader.hpp b/include/shadertoy/OpenGL/Shader.hpp
deleted file mode 100644
index 4ab119aeb184c958ba6275ab174242cca16f3ecd..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Shader.hpp
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_SHADER_HPP_
-#define _SHADERTOY_OPENGL_SHADER_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to dereference a null shader object.
-	 */
-	class shadertoy_EXPORT NullShaderError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullShaderError class.
-		 */
-		explicit NullShaderError();
-	};
-
-	/**
-	 * Error thrown when the compilation of a shader fails.
-	 */
-	class shadertoy_EXPORT ShaderCompilationError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the ShaderCompilationError class.
-		 *
-		 * @param  shaderId Id of the shader that triggered the error
-		 * @param  log      Contents of the shader compilation log
-		 */
-		explicit ShaderCompilationError(GLuint shaderId, const std::string &log);
-
-		/**
-		 * Gets the id of the shader that triggered the error.
-		 *
-		 * @return Id of the shader that triggered the error
-		 */
-		GLuint shaderId() const
-		{ return _shaderId; }
-
-		/**
-		 * Gets the compilation log for this error.
-		 *
-		 * @return Compilation log as a string.
-		 */
-		const std::string &log() const
-		{ return _log; }
-
-	private:
-		/// Shader id
-		const GLuint _shaderId;
-		/// Compilation log
-		const std::string _log;
-	};
-
-	/**
-	 * Implementation of the allocator pattern for shaders.
-	 * Takes a shader type as a supplementary parameter compared to the standard
-	 * resource allocators.
-	 */
-	class shadertoy_EXPORT ShaderAllocator
-	{
-	public:
-		/**
-		 * Create a shader object of the given type.
-		 * @param  shaderType Type of the shader to create
-		 * @return            Created shader id
-		 *
-		 * @throws OpenGLError
-		 */
-		GLuint Create(GLenum shaderType);
-		/**
-		 * Deletes the given shader.
-		 * @param resource Id of the shader to delete.
-		 *
-		 * @throws OpenGLError
-		 */
-		void Delete(GLuint resource);
-	};
-
-	/**
-	 * Represents an OpenGL shader.
-	 */
-	class shadertoy_EXPORT Shader : public Resource<Shader, ShaderAllocator, NullShaderError>
-	{
-	public:
-		/**
-		 * Creates a new shader of the given type.
-		 *
-		 * @param shaderType Type of the new shader
-		 *
-		 * @throws OpenGLError
-		 */
-		Shader(GLenum shaderType);
-
-		/**
-		 * glShaderSource
-		 *
-		 * @param string Single source as a string
-		 *
-		 * @throws OpenGLError
-		 * @throws NullShaderError
-		 */
-		void Source(const std::string &string);
-		/**
-		 * glShaderSource
-		 *
-		 * @param string List of sources to add to the shader
-		 *
-		 * @throws OpenGLError
-		 * @throws NullShaderError
-		 */
-		void Source(const std::vector<std::string> &string);
-
-		/**
-		 * glCompileShader
-		 *
-		 * @throws OpenGLError
-		 * @throws ShaderCompilationError
-		 * @throws NullShaderError
-		 */
-		void Compile();
-
-		/**
-		 * glGetShaderInfoLog
-		 *
-		 * @return Shader info log as a string
-		 *
-		 * @throws OpenGLError
-		 * @throws NullShaderError
-		 */
-		std::string Log();
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_SHADER_HPP_ */
diff --git a/include/shadertoy/OpenGL/Texture.hpp b/include/shadertoy/OpenGL/Texture.hpp
deleted file mode 100644
index 7bce0a2ca6b8523d2434d374bb737d8d4eba80c5..0000000000000000000000000000000000000000
--- a/include/shadertoy/OpenGL/Texture.hpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef _SHADERTOY_OPENGL_TEXTURE_HPP_
-#define _SHADERTOY_OPENGL_TEXTURE_HPP_
-
-#include "shadertoy/OpenGL/Resource.hpp"
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	/**
-	 * Error thrown when an attempt is made to dereference a null texture.
-	 */
-	class shadertoy_EXPORT NullTextureError : public shadertoy::ShadertoyError
-	{
-	public:
-		/**
-		 * Initializes a new instance of the NullTextureError class.
-		 */
-		explicit NullTextureError();
-	};
-
-	/**
-	 * Implementation of the allocator pattern for textures.
-	 * Takes a target as a supplementary parameter compared to the standard
-	 * resource allocators. Also links statically to glCreateTexture and
-	 * glDeleteTexture according to the OpenGL spec.
-	 */
-	class shadertoy_EXPORT TextureAllocator
-	{
-	public:
-		/**
-		 * Creates a new texture of the given type.
-		 *
-		 * @param  target Target of the texture to create
-		 * @return        Id of the created texture
-		 *
-		 * @throws OpenGLError
-		 */
-		GLuint Create(GLenum target);
-		/**
-		 * Deletes the given texture
-		 *
-		 * @param resource Id of the texture to delete
-		 *
-		 * @throws OpenGLError
-		 */
-		void Delete(GLuint resource);
-	};
-
-	/**
-	 * Represents an OpenGL texture.
-	 */
-	class shadertoy_EXPORT Texture : public Resource<Texture, TextureAllocator, NullTextureError>
-	{
-	public:
-		/**
-		 * Creates a new texture for the given target.
-		 *
-		 * @param target Target of the new texture.
-		 *
-		 * @throws OpenGLError
-		 */
-		Texture(GLenum target);
-
-		/**
-		 * glBindTexture
-		 *
-		 * @param target Target to bind the texture to
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void Bind(GLenum target);
-
-		/**
-		 * glTextureParameteri
-		 *
-		 * @param pname Parameter name to set
-		 * @param param Value of the parameter
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void Parameter(GLenum pname, GLint param);
-
-		/**
-		 * glTextureParameterf
-		 *
-		 * @param pname Parameter name to set
-		 * @param param Value of the parameter
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void Parameter(GLenum pname, GLfloat param);
-
-		/**
-		 * glTextureImage2DEXT
-		 *
-		 * @param target         Target
-		 * @param level          Level
-		 * @param internalFormat Internal format
-		 * @param width          Width
-		 * @param height         Height
-		 * @param border         Border (must be 0)
-		 * @param format         Format
-		 * @param type           Type
-		 * @param data           Data
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void Image2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *data);
-
-		/**
-		 * glGenerateTextureMipmap
-		 *
-		 * @throws OpenGLError
-		 * @throws NullTextureError
-		 */
-		void GenerateMipmap();
-	};
-}
-}
-
-#endif /* _SHADERTOY_OPENGL_TEXTURE_HPP_ */
diff --git a/include/shadertoy/RenderContext.hpp b/include/shadertoy/RenderContext.hpp
deleted file mode 100644
index 2afcfc1e23438812825f9b6fcd9675a21d8e6862..0000000000000000000000000000000000000000
--- a/include/shadertoy/RenderContext.hpp
+++ /dev/null
@@ -1,277 +0,0 @@
-#ifndef _SHADERTOY_RENDER_CONTEXT_HPP_
-#define _SHADERTOY_RENDER_CONTEXT_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief      Represents a context for rendering a specific ShaderToy program.
- */
-class shadertoy_EXPORT RenderContext
-{
-protected:
-	/// Last rendered-to texture
-	std::weak_ptr<OpenGL::Texture> lastTexture;
-
-	/// Program for screen quad
-	OpenGL::Program screenProg;
-
-private:
-	/// Config reference
-	ContextConfig &config;
-
-	/// Vertex shader for screen quad
-	OpenGL::Shader screenVs;
-
-	/// Fragment shader for screen quad
-	OpenGL::Shader screenFs;
-
-	/// Vertex buffer for screen quad
-	OpenGL::Buffer screenQuadCorners;
-	/// Index buffer for screen quad
-	OpenGL::Buffer screenQuadIndices;
-
-	/// Screen quad source texture
-	/// Note that this texture will only be allocated if needed
-	std::shared_ptr<OpenGL::Texture> screenQuadTexture;
-
-	/// Input texture engine
-	std::shared_ptr<TextureEngine> textureEngine;
-
-	/// Aux buffers
-	std::map<std::string, std::shared_ptr<ToyBuffer>> buffers;
-
-	// Cache for sources
-	std::map<std::string, std::string> sourceCache;
-
-	// Cache for define wrapper
-	std::string defineWrapper;
-
-	/// Raw frame count
-	int frameCount;
-
-	/// Uniform state
-	ShaderInputsType state;
-
-	// Callbacks
-
-	/**
-	 * @brief      When implemented in a derived class, provides a callback for
-	 *             initializing a custom texture engine instead of the default
-	 *             one. Note that this field is invoked after all other member
-	 *             fields of this class have been initialized, including the
-	 *             config reference.
-	 *
-	 *             The derived class may also invoke this method to allocate a
-	 *             texture engine with `buffer` texture type support, and add
-	 *             its own handlers on the allocated instance.
-	 *
-	 * @return     A pointer to a TextureEngine derived instance, which will be
-	 *             used by this instance.
-	 */
-	virtual std::shared_ptr<TextureEngine> BuildTextureEngine();
-
-	/**
-	 * @brief      When implemented in a derived class, provides a callback for
-	 *             executing code before the ShaderToy buffers are compiled and
-	 *             initialized.
-	 */
-	virtual void PreInitializeBuffers();
-
-	/**
-	 * @brief      When implemented in a derived class, provides a callback for
-	 *             executing code after the ShaderToy buffers have been compiled
-	 *             and initialized.
-	 */
-	virtual void PostInitializeBuffers();
-
-	/**
-	 * @brief      When implemented in a derived class, provides a callback for
-	 *             providing supplementary sources to insert in individual
-	 *             buffer fragment shaders.
-	 *
-	 * @param      sources  List which should hold the sources to be inserted.
-	 */
-	virtual void LoadBufferSources(std::vector<std::pair<std::string, std::string>> &sources);
-
-	/**
-	 * @brief      When implemented in a derived class, provides a callback for
-	 *             executing code after an auxiliary buffer has been rendered,
-	 *             and its input and output textures swapped.
-	 *
-	 *             The latest rendered result of this buffer will thus be in the
-	 *             *source* texture of the buffer.
-	 *
-	 * @param[in]  name    Name of the current buffer
-	 * @param      buffer  Buffer object
-	 */
-	virtual void PostBufferRender(const std::string &name,
-								  std::shared_ptr<ToyBuffer> &buffer);
-
-	/**
-	 * @brief      When implemented in a dervied class, provides a callback for
-	 *             adding supplementary inputs to be bound to a given program.
-	 *
-	 * @param      inputs   List which should hold the bound inputs to be
-	 *                      applied to the target program.
-	 * @param      program  Target shader program.
-	 */
-	virtual void BindInputs(std::vector<std::shared_ptr<BoundInputsBase>> &inputs,
-							OpenGL::Program &program);
-
-public:
-	/**
-	 * @brief      Create a new render context.
-	 *
-	 * @param      config  Configuration for this context.
-	 */
-	RenderContext(ContextConfig &config);
-
-	/**
-	 * @brief      Initialize a new render context
-	 */
-	void Initialize();
-
-	/**
-	 * @brief      Initializes the ShaderToy-like buffers
-	 */
-	void InitializeBuffers();
-
-	/**
-	 * @brief      Allocates textures based on the current config width and
-	 *             height. This can be useful for implementing framebuffer
-	 *             resize, but is more lightweight than calling Initialize,
-	 *             which recompiles shaders.
-	 */
-	void AllocateTextures();
-
-	/**
-	 * @brief      Clears all caches and buffers, call InitializeBuffers for
-	 *             reloading.
-	 */
-	void ClearState();
-
-	/**
-	 * @brief      Render the current frame into the current OpenGL context
-	 */
-	void Render();
-
-	/**
-	 * @brief      Retrieves the texture ids to allow an operation which uses
-	 *             the texIn texture as an input, and writes to the texOut
-	 *             texture. The caller is executing the operation.
-	 *
-	 * @param[in]  texIn   Input texture id for outside operation
-	 * @param[in]  texOut  Output texture id for outside operation
-	 */
-	void DoReadWriteCurrentFrame(GLuint &texIn, GLuint &texOut);
-
-	/**
-	 * @brief      Read the currently rendered result.
-	 *
-	 * @param      texIn  Input texture
-	 */
-	void DoReadCurrentFrame(GLuint &texIn);
-
-	/**
-	 * @brief      Get a reference to the texture engine of this render context.
-	 *
-	 * @return     The texture engine.
-	 */
-	inline TextureEngine &GetTextureEngine()
-	{ return *textureEngine; }
-
-	/**
-	 * @brief      Compiles a fragment shader for use in a ToyBuffer.
-	 *
-	 * @param[in]  id  Buffer configuration identifier.
-	 * @param      fs  Fragment shader object to compile to.
-	 */
-	void BuildBufferShader(const std::string &id,
-						   OpenGL::Shader &fs);
-
-	/**
-	 * @brief      Loads a shader source by its path.
-	 *
-	 * @param[in]  path  Path to the shader file.
-	 *
-	 * @return     Contents of the shader source.
-	 */
-	const GLchar *LoadShaderSource(const boost::filesystem::path &path) throw(std::runtime_error);
-
-	/**
-	 * @brief      Get the define wrapper for fragment shaders.
-	 *
-	 * @return     Source code of the preprocessor definition wrapper.
-	 */
-	const GLchar *GetDefineWrapper() const;
-
-	/**
-	 * @brief      Gets a reference to the uniform state container
-	 */
-	inline ShaderInputsType &GetState()
-	{ return state; }
-
-	/**
-	 * @brief      Gets a reference to the configuration objet for this context.
-	 */
-	inline ContextConfig &GetConfig()
-	{ return config; }
-
-	/**
-	 * @brief      Binds uniforms to an actual program, returning the handle object to these bound uniforms.
-	 *
-	 * @param program Program to bind to
-	 * @return
-	 */
-	std::vector<std::shared_ptr<BoundInputsBase>> GetBoundInputs(OpenGL::Program &program);
-
-	/**
-	 * @brief      Resets the current context target using the default viewport size
-	 *
-	 * @param[in]  level       Gray-level of the output
-	 */
-	void Clear(float level);
-
-	/**
-	 * @brief      Render a screen quad using the current context
-	 */
-	void RenderScreenQuad();
-
-	/**
-	 * @brief      Render a screen quad using the current context
-	 *
-	 * @param timerQuery Query object to use for measuring the runtime of the
-	 *                   draw call.
-	 */
-	void RenderScreenQuad(OpenGL::Query &timerQuery);
-
-	/**
-	 * @brief      Binds the texture containing the shadertoy result as well as
-	 *             a program which renders this texture to the viewport. Useful
-	 *             for rendering to screen by calling
-	 *             RenderContext::RenderScreenQuad().
-	 */
-	void BindResult();
-
-	/**
-	 * @brief      Get the default screen quad vertex shader
-	 */
-	OpenGL::Shader &GetScreenQuadVertexShader();
-
-	/**
-	 * Obtains the buffer object for the given name.
-	 *
-	 * @param  name [optional] Name of the buffer object to obtain. If empty,
-	 *              returns the image buffer.
-	 * @return      Pointer to the buffer object, or a null pointer if no such
-	 *              buffer exists.
-	 */
-	std::shared_ptr<ToyBuffer> GetBufferByName(const std::string &name = std::string());
-};
-
-}
-
-#endif /* _SHADERTOY_RENDER_CONTEXT_HPP_ */
diff --git a/include/shadertoy/ShaderCompiler.hpp b/include/shadertoy/ShaderCompiler.hpp
deleted file mode 100644
index b1cd9357dc451ae6698016c092b63947034258e7..0000000000000000000000000000000000000000
--- a/include/shadertoy/ShaderCompiler.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _SHADERTOY_SHADER_COMPILER_HPP_
-#define _SHADERTOY_SHADER_COMPILER_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief      ShaderCompiler is a class for compiling shaders while maintaining
- *             file names and line numbers in error messages returned by the
- *             OpenGL GLSL compiler.
- */
-class ShaderCompiler
-{
-	/// List of named sources
-	std::vector<std::pair<std::string, std::string>> namedSources;
-
-public:
-	/**
-	 * @brief      Initialize a new instance of the ShaderCompiler class
-	 */
-	ShaderCompiler();
-
-	/**
-	 * @brief      Obtain a reference to the named sources for this compiler.
-	 *
-	 *             Each pair of this list is a tuple (name, source) where name
-	 *             is the name of the shader source part, and source the actual
-	 *             GLSL code. The parts will be compiled in the same order as
-	 *             they are added to this vector.
-	 */
-	inline std::vector<std::pair<std::string, std::string>> &Sources()
-	{ return namedSources; }
-
-	/**
-	 * @brief      Loads the sources in the provided shader object, and compiles
-	 *             the program. Any program building errors will be rewritten so
-	 *             known named sources will have their name in the output
-	 *             instead of numerical source ids.
-	 *
-	 * @param      shader  The shader
-	 */
-	void Compile(OpenGL::Shader &shader);
-};
-
-}
-
-#endif /* _SHADERTOY_SHADER_COMPILER_HPP_ */
diff --git a/include/shadertoy/Shadertoy.hpp b/include/shadertoy/Shadertoy.hpp
deleted file mode 100644
index f707d61487b2b459f0baa8bfcd9afdfd52679c8e..0000000000000000000000000000000000000000
--- a/include/shadertoy/Shadertoy.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <boost/variant.hpp>
-#include <map>
-#include <sstream>
-#include <array>
-
-#include "shadertoy/pre.hpp"
-
-#include "shadertoy/ShadertoyError.hpp"
-
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "shadertoy/BufferConfig.hpp"
-#include "shadertoy/ContextConfig.hpp"
-#include "shadertoy/UniformState.hpp"
-#include "shadertoy/ToyBuffer.hpp"
-#include "shadertoy/TextureEngine.hpp"
-#include "shadertoy/RenderContext.hpp"
diff --git a/include/shadertoy/ShadertoyError.hpp b/include/shadertoy/ShadertoyError.hpp
deleted file mode 100644
index 76d9fa6f3faeac0bf251bb0e0472df62a772f9d0..0000000000000000000000000000000000000000
--- a/include/shadertoy/ShadertoyError.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _SHADERTOY_SHADERTOY_ERROR_HPP_
-#define _SHADERTOY_SHADERTOY_ERROR_HPP_
-
-#include "shadertoy/pre.hpp"
-
-#include <stdexcept>
-
-namespace shadertoy
-{
-/**
- * Base error class for libshadertoy errors.
- */
-class ShadertoyError : public std::runtime_error
-{
-public:
-	/**
-	 * Initializes a new instance of the ShadertoyError class.
-	 *
-	 * @param  what_arg Error message
-	 */
-	explicit ShadertoyError(const std::string &what_arg);
-	/**
-	 * Initializes a new instance of the ShadertoyError class.
-	 *
-	 * @param  what_arg Error message
-	 */
-	explicit ShadertoyError(const char *what_arg);
-};
-}
-
-#endif /* _SHADERTOY_SHADERTOY_ERROR_HPP_ */
diff --git a/include/shadertoy/TextureEngine.hpp b/include/shadertoy/TextureEngine.hpp
deleted file mode 100644
index fca4cd7a3b180695b66f237308cbf0aefc0ff54d..0000000000000000000000000000000000000000
--- a/include/shadertoy/TextureEngine.hpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef _SHADERTOY_TEXTURE_ENGINE_HPP_
-#define _SHADERTOY_TEXTURE_ENGINE_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * Handler callback definition for the texture engine. Instances of this method
- * are called when a texture is required for an input in a rendering context.
- *
- * `inputConfig` is the configuration object for the given input.
- * `skipTextureOptions` should be set to true if no wrapping or filtering
- * options should be automatically applied. `skipCache` should be set to true if
- * the method should be invoked each time a texture for this input is requested.
- * `framebufferSized` should be set to true if any change in framebuffer
- * resolution should require generating a new instance of this texture.
- */
-typedef std::function<std::shared_ptr<OpenGL::Texture>(
-	const InputConfig &inputConfig,
-	bool &skipTextureOptions,
-	bool &skipCache,
-	bool &framebufferSized)> InputHandler;
-
-/**
- * @brief      Represents the engine responsible for loading input textures for
- *             the current rendering context.
- */
-class shadertoy_EXPORT TextureEngine
-{
-	/// Context configuration reference
-	ContextConfig &config;
-
-	/// Input texture state
-	std::map<std::string, std::tuple<std::shared_ptr<OpenGL::Texture>, bool> > inputTextures;
-
-	/// The empty texture
-	std::shared_ptr<OpenGL::Texture> emptyTexture;
-
-	/// Registered texture handlers
-	std::map<std::string, InputHandler> handlers;
-
-	// Default texture handlers
-	std::shared_ptr<OpenGL::Texture> SOILTextureHandler(const InputConfig &inputConfig,
-		bool &skipTextureOptions,
-		bool &skipCache,
-		bool &framebufferSized);
-	std::shared_ptr<OpenGL::Texture> NoiseTextureHandler(const InputConfig &inputConfig,
-		bool &skipTextureOptions,
-		bool &skipCache,
-		bool &framebufferSized);
-	std::shared_ptr<OpenGL::Texture> CheckerTextureHandler(const InputConfig &inputConfig,
-		bool &skipTextureOptions,
-		bool &skipCache,
-		bool &framebufferSized);
-
-protected:
-	/**
-	 * @brief      Applies filtering and wrapping options of a given input onto
-	 *             an already allocated OpenGL texture object.
-	 *
-	 * @param[in]  inputConfig  The input configuration for this texture
-	 * @param      texture      The texture to apply the options to
-	 */
-	void ApplyTextureOptions(const InputConfig &inputConfig,
-							 OpenGL::Texture &texture);
-
-public:
-	/**
-	 * @brief      Initialize a new instance of the texture engine class.
-	 *
-	 * @param      config  Context configuration to use for this engine.
-	 */
-	TextureEngine(ContextConfig &config);
-
-	/**
-	 * @brief      Initialize this texture engine
-	 */
-	void Initialize();
-
-	/**
-	 * @brief      Clears loaded textures.
-	 *
-	 * @param      framebufferSizeChange  true if this event is being triggered
-	 *                                    by a change in framebuffer size, which
-	 *                                    should then only clear the textures
-	 *                                    whose size is the same as the
-	 *                                    framebuffer. false if all textures
-	 *                                    should be reloaded, including
-	 *                                    framebuffer-independent textures.
-	 */
-	void ClearState(bool framebufferSizeChange = false);
-
-	/**
-	 * @brief      Get the texture for the given input
-	 *
-	 * @param[in]  inputConfig  The input configuration
-	 *
-	 * @return     A texture instance to be used for rendering. If the actual
-	 *             input configuration is invalid, an empty texture is returned.
-	 */
-	OpenGL::Texture &GetInputTexture(const InputConfig &inputConfig);
-
-	/**
-	 * @brief      Registers a texture type handler with the given name.
-	 *
-	 * @param[in]  name     Name (type ID) of the texture handler
-	 * @param[in]  handler  Handler function. See InputHandler for more details.
-	 */
-	void RegisterHandler(const std::string &name, InputHandler handler);
-};
-
-}
-
-#endif /* _SHADERTOY_TEXTURE_ENGINE_HPP_ */
diff --git a/include/shadertoy/ToyBuffer.hpp b/include/shadertoy/ToyBuffer.hpp
deleted file mode 100644
index 3e375b59b32ed185f14dcced16174a785dde0a87..0000000000000000000000000000000000000000
--- a/include/shadertoy/ToyBuffer.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef _SHADERTOY_TOY_BUFFER_HPP_
-#define _SHADERTOY_TOY_BUFFER_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief      Represents a ShaderToy-like buffer with inputs, programs and output
- */
-class shadertoy_EXPORT ToyBuffer
-{
-private:
-	/// Render context
-	RenderContext &context;
-
-	/// Buffer identifier
-	const std::string id;
-
-	/// Target framebuffer
-	OpenGL::Framebuffer targetFbo;
-
-	/// Target renderbuffer
-	OpenGL::Renderbuffer targetRbo;
-
-	/// Source texture
-	std::shared_ptr<OpenGL::Texture> sourceTex;
-
-	/// Target texture
-	std::shared_ptr<OpenGL::Texture> targetTex;
-
-	/// Buffer program
-	OpenGL::Program program;
-
-	/// Fragment shader
-	OpenGL::Shader fs;
-
-	/// Bound uniform state
-	std::vector<std::shared_ptr<shadertoy::BoundInputsBase>> boundInputs;
-
-	/// Query for iTimeDelta execution time
-	OpenGL::Query timeDeltaQuery;
-
-public:
-	/**
-	 * @brief      Initializes a new ShaderToy buffer
-	 *
-	 * @param      context  Rendering context
-	 * @param[in]  id       Identifier for this buffer
-	 */
-	ToyBuffer(RenderContext &context, const std::string &id);
-
-	/**
-	 * @brief      Prepare the current buffer for rendering
-	 *
-	 * @param[in]  width   Width of the rendering textures for this buffer.
-	 * @param[in]  height  Height of the rendering textures for this buffer.
-	 */
-	void Initialize(int width, int height);
-
-	/**
-	 * @brief      Allocates the textures for this buffer. Note that the current
-	 *             contents of previous textures are discarded.
-	 *
-	 * @param[in]  width   Width of the texture
-	 * @param[in]  height  Height of the texture
-	 */
-	void AllocateTextures(int width, int height);
-
-	/**
-	 * @brief      Render the buffer using the current OpenGL context
-	 */
-	void Render();
-
-	/**
-	 * @brief      Get a reference to the source texture for this buffer
-	 *
-	 * @return     Source texture for this buffer.
-	 */
-	inline std::shared_ptr<OpenGL::Texture> GetSourceTexture() const
-	{ return sourceTex; }
-
-	/**
-	 * @brief      Get a reference to the current texture for this buffer
-	 *
-	 * @return     Target (current) texture for this buffer.
-	 */
-	inline std::shared_ptr<OpenGL::Texture> GetTargetTexture() const
-	{ return targetTex; }
-
-	/**
-	 * @brief      Obtain the duration of the last rendering of this buffer, in
-	 *             nanoseconds. This method may block while waiting for the
-	 *             query object to be available.
-	 *
-	 * @return     Number of nanoseconds elapsed during the rendering of this
-	 *             buffer.
-	 */
-	unsigned long long GetElapsedTime();
-
-private:
-	void InitializeRenderTexture(std::shared_ptr<OpenGL::Texture> &tex, int width, int height);
-};
-
-}
-
-#endif /* _SHADERTOY_TOY_BUFFER_HPP_ */
diff --git a/include/shadertoy/UniformState.hpp b/include/shadertoy/UniformState.hpp
deleted file mode 100644
index 4808ca4fa744b306b4762c3804088366c71428e6..0000000000000000000000000000000000000000
--- a/include/shadertoy/UniformState.hpp
+++ /dev/null
@@ -1,560 +0,0 @@
-#ifndef _SHADERTOY_UNIFORM_STATE_HPP_
-#define _SHADERTOY_UNIFORM_STATE_HPP_
-
-#include "shadertoy/pre.hpp"
-
-namespace shadertoy
-{
-
-/**
- * @brief Information about a GLSL type deduced from a C++ type.
- * First element is the type name, second element is the potential array suffix.
- */
-typedef std::tuple<std::string, std::string> GLSLTypeInfo;
-
-/**
- * @brief boost::variant visitor to return the GLSL typename of a boost::variant used
- * in a dynamic inputs block. This class may be derived to implement support
- * for more GLSL types.
- */
-struct shadertoy_EXPORT DynamicShaderInputsGLSLTypeVisitor : public boost::static_visitor<GLSLTypeInfo>
-{
-	inline GLSLTypeInfo operator()(int) const { return std::make_tuple("int", ""); }
-	inline GLSLTypeInfo operator()(glm::ivec2) const { return std::make_tuple("ivec2", ""); }
-	inline GLSLTypeInfo operator()(glm::ivec3) const { return std::make_tuple("ivec3", ""); }
-	inline GLSLTypeInfo operator()(glm::ivec4) const { return std::make_tuple("ivec4", ""); }
-
-	inline GLSLTypeInfo operator()(float) const { return std::make_tuple("float", ""); }
-	inline GLSLTypeInfo operator()(glm::vec2) const { return std::make_tuple("vec2", ""); }
-	inline GLSLTypeInfo operator()(glm::vec3) const { return std::make_tuple("vec3", ""); }
-	inline GLSLTypeInfo operator()(glm::vec4) const { return std::make_tuple("vec4", ""); }
-
-	inline GLSLTypeInfo operator()(unsigned int) const { return std::make_tuple("unsigned int", ""); }
-	inline GLSLTypeInfo operator()(glm::uvec2) const { return std::make_tuple("uvec2", ""); }
-	inline GLSLTypeInfo operator()(glm::uvec3) const { return std::make_tuple("uvec3", ""); }
-	inline GLSLTypeInfo operator()(glm::uvec4) const { return std::make_tuple("uvec4", ""); }
-
-	template<class T, std::size_t N>
-	GLSLTypeInfo operator()(std::array<T, N> &) const {
-		return std::make_tuple(std::get<0>((*this)(T())),
-			std::string("[") + std::string(N) + std::string("]") +
-			std::get<1>((*this)(T())));
-	}
-
-	template<class T>
-	GLSLTypeInfo operator()(std::shared_ptr<T> &) const { return (*this)(T()); }
-};
-
-/**
- * @brief boost::variant visitor that sets the value to be sent to the driver based on
- * the type of the object contained in the boost::variant.
- */
-class shadertoy_EXPORT DynamicShaderInputUniformSetter : public boost::static_visitor<bool>
-{
-	/// OpenGL GLSL uniform location to set
-	OpenGL::UniformLocation &location;
-
-public:
-	template<class T>
-	inline bool operator()(const T& value) const
-	{
-		location.SetValue(1, &value);
-		return true;
-	}
-
-	template<class T, std::size_t N>
-	inline bool operator()(const std::array<T, N> &value) const
-	{
-		location.SetValue(N, value.data());
-		return true;
-	}
-
-	template<class T>
-	inline bool operator()(const std::shared_ptr<T> &ptr) const
-	{
-		return (*this)(*ptr);
-	}
-
-	/**
-	 * @brief Creates a new setter visitor.
-	 *
-	 * @param location GLSL program location to set
-	 */
-	DynamicShaderInputUniformSetter(OpenGL::UniformLocation &location)
-		: location(location)
-	{}
-};
-
-/**
- * @brief      A typed shader input uniform.
- *
- * @tparam UniformName Name of the uniform in the shader program
- * @tparam UniformType Type of the associated GLSL uniform
- * @tparam TUniform    Type of the uniform (GLfloat, GLint, glm::vec3, etc)
- * @tparam Count       Number of instances of the type. Must be strictly positive
- */
-template<const char *UniformName, const char *UniformType, typename TUniform,
-	size_t Count = 1, typename = typename std::enable_if<(Count >= 1)>::type>
-struct shadertoy_EXPORT ShaderInput
-{
-	static constexpr const char *Name = UniformName;
-	static constexpr const char *GLSLTypeName = UniformType;
-	static constexpr const size_t N = Count;
-	using ValueType = TUniform;
-	using ArrayType = std::array<ValueType, N>;
-
-private:
-	ArrayType _values;
-
-public:
-	/**
-	 * @brief Obtains the values of this input as an array.
-	 */
-	inline ArrayType &Values() { return _values; }
-
-	/**
-	 * @brief Initializes a new shader input.
-	 */
-	ShaderInput()
-		: _values()
-	{
-	}
-
-	/**
-	 * @brief Appends the GLSL definition of this input to the given output stream.
-	 *
-	 * @param os Output stream to append to
-	 */
-	static void AppendDefinition(std::ostream &os)
-	{
-		os << "uniform " << GLSLTypeName << " " << Name;
-
-		if (N > 1)
-		{
-			os << "[" << N << "]";
-		}
-
-		os << ";" << std::endl;
-	}
-};
-
-/**
- * @brief Represents a block of dynamic inputs. Dynamic inputs are defined by the
- * calling program at run-time, before the GLSL programs are compiled.
- *
- * @tparam DynamicInputName Name of the uniform block. This is used to
- *                          distinguish this input from other static inputs.
- * @tparam GLSLTypeVisitor  An implementation of a boost::variant visitor that
- *                          follows the conventions set by
- *                          DynamicShaderInputsGLSLTypeVisitor.
- * @tparam Types            List of typenames that define the types supported by
- *                          this dynamic uniform block.
- */
-template<const char *DynamicInputName, class GLSLTypeVisitor, class ...Types>
-struct shadertoy_EXPORT DynamicShaderInputs
-{
-	static constexpr const char *Name = DynamicInputName;
-	static constexpr const size_t N = 0;
-
-	typedef boost::variant<std::shared_ptr<Types>...> VariantPtr;
-	typedef DynamicShaderInputs<DynamicInputName, Types...> ValueType;
-
-private:
-	std::map<std::string, VariantPtr> InputMap;
-
-public:
-	/**
-	 * @brief Adds a new input to this dynamic block.
-	 *
-	 * @param name  Name to use for the uniform variable. This must be a
-	 *              valid GLSL identifier.
-	 * @param args  Arguments to the constructor of the initial value.
-	 */
-	template<typename T, typename ...Args>
-	void Add(const std::string &name, Args... args)
-	{
-		InputMap.insert(std::make_pair<std::string, VariantPtr>(std::string(name),
-			std::make_shared<T>(std::forward<Args...>(args...))));
-	}
-
-	/**
-	 * @brief Obtains a reference to the value of a dynamic uniform.
-	 *
-	 * @param  name Name of the uniform to obtain.
-	 * @return      Reference to the value of this uniform.
-	 */
-	template<typename T>
-	T &Get(const std::string &name)
-	{
-		return *boost::get<std::shared_ptr<T>>(InputMap[name]);
-	}
-
-	/**
-	 * @brief Removes a dynamic uniform.
-	 *
-	 * @param name Name of the uniform to remove from this block.
-	 */
-	void Remove(const std::string &name)
-	{
-		InputMap.erase(name);
-	}
-
-	/**
-	 * @brief Appends the GLSL definition of this input to the given output stream.
-	 *
-	 * @param os Output stream to append to
-	 */
-	void AppendDefinition(std::ostream &os)
-	{
-		os << "/* " << Name << " uniforms */" << std::endl;
-
-		for (auto &pair : InputMap)
-		{
-			auto type_info(boost::apply_visitor(GLSLTypeVisitor(), pair.second));
-			os << "uniform " << std::get<0>(type_info) << " "
-				<< pair.first << std::get<1>(type_info) << ";" << std::endl;
-		}
-	}
-
-	/**
-	 * @brief Binds the inputs of this dynamic uniform block to the given program.
-	 *
-	 * @param program Program to bind uniforms to.
-	 */
-	std::map<std::string, OpenGL::UniformLocation> BindInputs(OpenGL::Program &program)
-	{
-		std::map<std::string, OpenGL::UniformLocation> result;
-
-		for (auto &pair : InputMap)
-		{
-			result.insert(std::make_pair(pair.first, program.GetUniformLocation(pair.first.c_str())));
-		}
-
-		return result;
-	}
-
-	/**
-	 * @brief Applies the values of the input with the given name, to the given
-	 * location.
-	 *
-	 * @param  name     Name of the uniform input to apply
-	 * @param  location GLSL uniform location to set
-	 * @return          true if the location was set, false otherwise
-	 */
-	bool SetValue(const std::string &name, OpenGL::UniformLocation &location)
-	{
-		return boost::apply_visitor(DynamicShaderInputUniformSetter(location), InputMap[name]);
-	}
-};
-
-/**
- * @brief      A base class for representing the state of inputs bound to
- *             particular shader program.
- */
-class shadertoy_EXPORT BoundInputsBase
-{
-protected:
-	virtual ~BoundInputsBase() = default;
-
-public:
-	/**
-	 * @brief      Sets the current value of inputs bound to this program
-	 *             instance in the associated shader program.
-	 */
-	virtual void Apply() = 0;
-};
-
-/**
- * @brief      A collection of named inputs, to be bound to actual programs.
- *
- * @tparam Inputs ShaderInput definitions
- */
-template<class ...Inputs>
-class shadertoy_EXPORT ShaderInputs
-{
-public:
-	/// Templated shader input type itself
-	typedef ShaderInputs<Inputs...> StateType;
-
-	/// Index sequence matching Inputs definition
-	using Indices = std::make_index_sequence<sizeof...(Inputs)>;
-
-private:
-	/// boost::variant pointer to the different supported input types
-	typedef boost::variant<std::shared_ptr<Inputs>...> VariantPtr;
-
-	/// Map of inputs where keys are uniform names, for fast lookup.
-	std::map<std::string, VariantPtr> InputMap;
-
-	/// Tuple of initialized inputs
-	std::tuple<std::shared_ptr<Inputs>...> AllInputs;
-
-public:
-	/**
-	 * @brief      Represents the binding of inputs to a specific program.
-	 */
-	class BoundInputs : public BoundInputsBase
-	{
-	public:
-		/// State these bound inputs are derived from
-		StateType &State;
-
-	private:
-		template<typename Input, typename Enable = void>
-		struct Uniform {};
-
-		/**
-		 * @brief Bound uniform object for scalar inputs.
-		 */
-		template<typename Input>
-		struct Uniform<Input, typename std::enable_if<(Input::N > 0)>::type>
-		{
-			OpenGL::UniformLocation Location;
-
-			Uniform(std::shared_ptr<Input> &, OpenGL::Program &program)
-				: Location(program.GetUniformLocation(Input::Name))
-			{
-			}
-
-			/**
-			 * @brief Applies the values of the given input to the associated location.
-			 *
-			 * @param  valptr Pointer to the input containing the value to set.
-			 * @return        true if the uniform location was set, false
-			 *                otherwise.
-			 */
-			bool SetValue(std::shared_ptr<Input> &valptr)
-			{
-				return Location.SetValue(
-					valptr->Values().size(),
-					static_cast<const typename Input::ValueType *>(valptr->Values().data()));
-			}
-		};
-
-		/**
-		 * @brief Bound uniform object for dynamic inputs.
-		 */
-		template<typename Input>
-		struct Uniform<Input, typename std::enable_if<(Input::N < 1)>::type>
-		{
-			std::map<std::string, OpenGL::UniformLocation> Locations;
-
-			Uniform(std::shared_ptr<Input> &input, OpenGL::Program &program)
-				: Locations(input->BindInputs(program))
-			{
-			}
-
-			/**
-			 * @brief Applies all the values of the given dynamic input to the
-			 * associated locations.
-			 *
-			 * @param  valptr Pointer to the input containing the values to set.
-			 * @return        true if the uniform locations were set, false
-			 *                otherwise
-			 */
-			bool SetValue(std::shared_ptr<Input> &valptr)
-			{
-				bool result = true;
-
-				for (auto &pair : Locations)
-					result = result && valptr->SetValue(pair.first, pair.second);
-
-				return result;
-			}
-		};
-
-		/// Uniform objects tuple
-		std::tuple<Uniform<Inputs>...> Uniforms;
-
-		/**
-		 * @brief      Sets the value of a given uniform in this bound input object
-		 *
-		 * @tparam Index Index of the uniform in the parent state type declaration
-		 * @tparam Type  Type of the shader input object in the parent state type declaration
-		 * @return       true if the value has been set, false if the associated uniform was inactive
-		 */
-		template<size_t Index, class Type>
-		bool SetValue()
-		{
-			auto valptr = std::get<Index>(State.AllInputs);
-			auto &uniform(std::get<Index>(Uniforms));
-
-			// Set uniform using state value
-			return uniform.SetValue(valptr);
-		}
-
-		/**
-		 * @brief      Sets all the values of uniforms declared by the parent state
-		 *
-		 * @tparam Indices Index range of the uniforms in the parent state type declaration
-		 */
-		template<size_t... Indices>
-		void SetValues(std::index_sequence<Indices...>)
-		{
-			bool _[] = {SetValue<Indices, Inputs>()...};
-			(void) _;
-		}
-
-	public:
-		/**
-		 * @brief      Initializes a new instance of a bound uniform object.
-		 *
-		 * @tparam Indices Index range of the uniforms in the parent state type declaration
-		 * @param state Parent state of this uniform object
-		 * @param program Program to bind to
-		 */
-		template<size_t... Indices>
-		BoundInputs(StateType &state, OpenGL::Program &program, std::index_sequence<Indices...>)
-			: State(state),
-			  Uniforms(Uniform<Inputs>(std::get<Indices>(state.AllInputs), program)...)
-		{
-		}
-
-		/**
-		 * @brief      Applies the value of all uniforms to the current program.
-		 */
-		void Apply() override
-		{
-			SetValues(std::make_index_sequence<sizeof...(Inputs)>());
-		}
-	};
-
-	private:
-	/**
-	 * @brief Internal implementation of AppendDefinition using index_sequence.
-	 */
-	template<size_t... Indices>
-	void AppendDefinitions(std::ostream &os, std::index_sequence<Indices...>)
-	{
-		int _[] = {(std::get<Indices>(AllInputs)->AppendDefinition(os), 0)...};
-		(void) _;
-	}
-
-	public:
-	/**
-	 * @brief Get a reference to the dynamic input object of type Input.
-	 *
-	 * @tparam Input Uniform typed identifier
-	 * @return Reference to the dynamic input object of type Input.
-	 */
-	template<typename Input, typename = typename std::enable_if<(Input::N < 1)>::type>
-	Input &V()
-	{
-		return *boost::get<std::shared_ptr<Input>>(InputMap[Input::Name]);
-	}
-
-	/**
-	 * @brief      Get a reference to the storage (as a single value) for the given uniform input.
-	 *
-	 * @tparam Input Uniform typed identifier
-	 * @return
-	 */
-	template<typename Input, typename = typename std::enable_if<(Input::N == 1)>::type>
-	typename Input::ValueType &V()
-	{
-		return std::get<0>(boost::get<std::shared_ptr<Input>>(InputMap[Input::Name])->Values());
-	}
-
-	/**
-	 * @brief      Get a reference to the storage (as a single value) for the given uniform input.
-	 *
-	 * @tparam Input Uniform typed identifier
-	 * @return
-	 */
-	template<typename Input, typename = typename std::enable_if<(Input::N == 1)>::type>
-	const typename Input::ValueType &V() const
-	{
-		return std::get<0>(boost::get<std::shared_ptr<Input>>(InputMap.find(Input::Name)->second)->Values());
-	}
-
-	/**
-	 * @brief      Get a reference to the storage (as an array) for the given uniform input.
-	 *
-	 * @tparam Input Uniform typed identifier
-	 * @return
-	 */
-	template<typename Input, typename = typename std::enable_if<(Input::N > 1)>::type>
-	typename Input::ArrayType &V()
-	{
-		return boost::get<std::shared_ptr<Input>>(InputMap[Input::Name])->Values();
-	}
-
-	/**
-	 * @brief      Get a reference to the storage (as an array) for the given uniform input.
-	 *
-	 * @tparam Input Uniform typed identifier
-	 * @return
-	 */
-	template<typename Input, typename = typename std::enable_if<(Input::N > 1)>::type>
-	const typename Input::ArrayType &V() const
-	{
-		return boost::get<std::shared_ptr<Input>>(InputMap.find(Input::Name)->second)->Values();
-	}
-
-	/**
-	 * @brief      Binds uniform inputs to a specific programs, and returns the handle object.
-	 *
-	 * @param program Program to bind to.
-	 * @return
-	 */
-	std::shared_ptr<BoundInputs> GetBoundInputs(OpenGL::Program &program)
-	{
-		return std::make_shared<BoundInputs>(*this, program, Indices());
-	}
-
-	/**
-	 * @brief      Get the GLSL code for defining the uniforms part of this
-	 *             template instance.
-	 *
-	 * @return     GLSL code to include in the shader compilation stage.
-	 */
-	std::string GetDefinitions()
-	{
-		std::stringstream ss;
-
-		// Invoke append definition for each input
-		AppendDefinitions(ss, Indices());
-
-		return ss.str();
-	}
-
-	/**
-	 * @brief      Initialize a new instance of the ShaderInputs class.
-	 */
-	ShaderInputs()
-		: InputMap{(std::make_pair<std::string, VariantPtr>(
-		Inputs::Name,
-		std::make_shared<Inputs>()))...},
-		  AllInputs((boost::get<std::shared_ptr<Inputs>>(InputMap[Inputs::Name]))...)
-	{
-	}
-};
-}
-
-// Definitions for shader inputs
-#include "shadertoy/UniformState_impl.hpp"
-
-namespace shadertoy
-{
-
-/// Default program state typedef
-typedef ShaderInputs<
-	iResolution,
-	iTime,
-	iTimeDelta,
-	iFrame,
-	iFrameRate,
-	iChannelTime,
-	iChannelResolution,
-	iMouse,
-	iChannel0,
-	iChannel1,
-	iChannel2,
-	iChannel3,
-	iDate,
-	iSampleRate
-> ShaderInputsType;
-
-}
-
-#endif /* _SHADERTOY_UNIFORM_STATE_HPP_ */
diff --git a/include/shadertoy/UniformState_decl.hpp b/include/shadertoy/UniformState_decl.hpp
deleted file mode 100644
index def8da895465374fb89ff16ad946af6be15a5396..0000000000000000000000000000000000000000
--- a/include/shadertoy/UniformState_decl.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef IMPLEMENT_UNIFORM_STATE
-#if !defined(DECLARE_UNIFORM) && !defined(DECLARE_UNIFORM_N) && !defined(DECLARE_DYNAMIC_UNIFORM)
-/**
- * @brief          Helper macro to declare a uniform instance
- */
-#define DECLARE_UNIFORM(type, name, glsl) shadertoy_EXPORT extern const char name ## Name []; \
-										  shadertoy_EXPORT extern const char name ## GLSLTypeName []; \
-										  typedef ShaderInput<name ## Name, name ## GLSLTypeName, type> name
-/**
- * @brief          Helper macro to declare a uniform instance as an array
- */
-#define DECLARE_UNIFORM_N(type, name, n, glsl) shadertoy_EXPORT extern const char name ## Name []; \
-											   shadertoy_EXPORT extern const char name ## GLSLTypeName []; \
-											   typedef ShaderInput<name ## Name, name ## GLSLTypeName, type, n> name
-
-/**
- * @brief          Helper macro to declare a dynamic uniform block
- */
-#define DECLARE_DYNAMIC_UNIFORM(name, ...) shadertoy_EXPORT extern const char name ## Name []; \
-										   typedef shadertoy::DynamicShaderInputs<name ## Name, shadertoy::DynamicShaderInputsGLSLTypeVisitor, __VA_ARGS__> name
-
-#endif /* !defined(DECLARE_UNIFORM) && !defined(DECLARE_UNIFORM_N) && !defined(DECLARE_DYNAMIC_UNIFORM) */
-#else /* IMPLEMENT_UNIFORM_STATE */
-#undef DECLARE_UNIFORM
-#undef DECLARE_UNIFORM_N
-#undef DECLARE_DYNAMIC_UNIFORM
-
-#define DECLARE_UNIFORM(type, name, glsl) const char name ## Name [] = #name; \
-										  const char name ## GLSLTypeName [] = glsl
-#define DECLARE_UNIFORM_N(type, name, n, glsl) const char name ## Name [] = #name; \
-											   const char name ## GLSLTypeName [] = glsl
-
-#define DECLARE_DYNAMIC_UNIFORM(name, ...) const char name ## Name [] = #name
-
-#endif /* IMPLEMENT_UNIFORM_STATE */
diff --git a/include/shadertoy/UniformState_impl.hpp b/include/shadertoy/UniformState_impl.hpp
deleted file mode 100644
index c3a8a0983f181a48cab12f2d6225bde6b1acbc37..0000000000000000000000000000000000000000
--- a/include/shadertoy/UniformState_impl.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "shadertoy/UniformState_decl.hpp"
-
-namespace shadertoy
-{
-
-// The viewport resolution (z is pixel aspect ratio, usually 1.0)
-DECLARE_UNIFORM(glm::vec3, iResolution, "vec3");
-
-// Current time in seconds
-DECLARE_UNIFORM(GLfloat, iTime, "float");
-
-// Time it takes to render a frame, in seconds
-DECLARE_UNIFORM(GLfloat, iTimeDelta, "float");
-
-// Current frame
-DECLARE_UNIFORM(GLint, iFrame, "int");
-
-// Number of frames rendered per second
-DECLARE_UNIFORM(GLfloat, iFrameRate, "float");
-
-// Time for channel (if video or sound), in seconds
-// Currently not used because video and sound is not supported
-DECLARE_UNIFORM_N(GLfloat, iChannelTime, 4, "float");
-
-// Input texture resolution for each channel
-DECLARE_UNIFORM_N(glm::vec3, iChannelResolution, 4, "vec3");
-
-// xy = current pixel coords (if LMB is down). zw = click pixel
-DECLARE_UNIFORM(glm::vec4, iMouse, "vec4");
-
-// Sampler for input texture 0
-DECLARE_UNIFORM(GLint, iChannel0, "sampler2D");
-
-// Sampler for input texture 1
-DECLARE_UNIFORM(GLint, iChannel1, "sampler2D");
-
-// Sampler for input texture 2
-DECLARE_UNIFORM(GLint, iChannel2, "sampler2D");
-
-// Sampler for input texture 3
-DECLARE_UNIFORM(GLint, iChannel3, "sampler2D");
-
-// Year, month, day, time in seconds in .xyzw
-DECLARE_UNIFORM(glm::vec4, iDate, "vec4");
-
-// The sound sample rate
-// Currently not used because sound is not supported
-DECLARE_UNIFORM(GLfloat, iSampleRate, "float");
-
-}
diff --git a/include/stdafx.hpp b/include/stdafx.hpp
deleted file mode 100644
index ba0fd8c0e3fc575512b9c2b56236486b25de1b7a..0000000000000000000000000000000000000000
--- a/include/stdafx.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <iostream>
-#include <string>
-#include <vector>
-#include <sstream>
-#include <memory>
-#include <algorithm>
-#include <fstream>
-
-#include <SOIL/SOIL.h>
-#include <jpeglib.h>
-
-#include <epoxy/gl.h>
-
-#include <glm/glm.hpp>
-
-#include <boost/filesystem.hpp>
-#include <boost/log/trivial.hpp>
-#include <boost/variant.hpp>
-#include <boost/archive/xml_oarchive.hpp>
-#include <boost/archive/xml_iarchive.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/array.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/algorithm/string.hpp>
diff --git a/shaders/wrapper_footer.fsh b/shaders/wrapper_footer.fsh
deleted file mode 100644
index e89c1f32b8788b10397cb86ae719db43e3180619..0000000000000000000000000000000000000000
--- a/shaders/wrapper_footer.fsh
+++ /dev/null
@@ -1,6 +0,0 @@
-
-// GLSL entry point
-void main(void) {
-	fragColor = vec4(0.,0.,0.,1.);
-	mainImage(fragColor, vtexCoord.xy * iResolution.xy);
-}
diff --git a/shaders/wrapper_header.fsh b/shaders/wrapper_header.fsh
deleted file mode 100644
index 20d8e53632b249f83aacef84372ced44d9c56f39..0000000000000000000000000000000000000000
--- a/shaders/wrapper_header.fsh
+++ /dev/null
@@ -1,10 +0,0 @@
-#version 330
-
-precision highp float;
-precision highp int;
-precision highp sampler2D;
-
-// Input texture coordinate
-in vec2 vtexCoord;
-// Output fragment color
-out vec4 fragColor;
diff --git a/src/BufferConfig.cpp b/src/BufferConfig.cpp
deleted file mode 100644
index a0608fbf8ff92e4a4adabfd7cf768b4b008628de..0000000000000000000000000000000000000000
--- a/src/BufferConfig.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/BufferConfig.hpp"
-
-using namespace std;
-
-namespace fs = boost::filesystem;
-
-using namespace shadertoy;
-
-bool InputConfig::enabled() const
-{
-	return !id.empty() && !type.empty();
-}
-
-InputConfig::InputConfig()
-	: id(),
-	  type(),
-	  source(),
-	  wrap(GL_REPEAT),
-	  minFilter(GL_LINEAR),
-	  magFilter(GL_LINEAR)
-{
-}
diff --git a/src/ContextConfig.cpp b/src/ContextConfig.cpp
deleted file mode 100644
index c7bb4d88b8181b411a5eecb41377680db3c2cb53..0000000000000000000000000000000000000000
--- a/src/ContextConfig.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "stdafx.hpp"
-
-#include "shadertoy/BufferConfig.hpp"
-#include "shadertoy/ContextConfig.hpp"
-
-using namespace shadertoy;
diff --git a/src/OpenGL/Buffer.cpp b/src/OpenGL/Buffer.cpp
deleted file mode 100644
index 4f6de470d2a4279be8d4c3141ac1f41b8b2dfa5a..0000000000000000000000000000000000000000
--- a/src/OpenGL/Buffer.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Buffer.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullBufferError::NullBufferError()
-	: ShadertoyError("An attempt was made to dereference a null buffer")
-{
-}
-
-void Buffer::Bind(GLenum target)
-{
-	glCall(glBindBuffer, target, GLuint(*this));
-}
-
-void Buffer::Data(GLsizei size, const void *data, GLenum usage)
-{
-	glCall(glNamedBufferData, GLuint(*this), size, data, usage);
-}
diff --git a/src/OpenGL/Caller.cpp b/src/OpenGL/Caller.cpp
deleted file mode 100644
index 5605ec7ce1a21db4ffa98cde0b31f532b0f5d930..0000000000000000000000000000000000000000
--- a/src/OpenGL/Caller.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Caller.hpp"
-
-#if HAS_UNWIND
-#include <libunwind.h>
-#endif
-
-#define ERROR_PREFIX "OpenGL error: "
-
-using namespace shadertoy::OpenGL;
-
-std::string glErrorToString(GLenum error, const std::string &extraMsg)
-{
-	std::stringstream ss;
-	ss << ERROR_PREFIX;
-
-	switch (error)
-	{
-		case GL_NO_ERROR:
-			ss << "No error.";
-			break;
-		case GL_INVALID_ENUM:
-			ss << "An unacceptable value is specified for an enumerated argument.";
-			break;
-		case GL_INVALID_VALUE:
-			ss << "A numeric argument is out of range.";
-			break;
-		case GL_INVALID_OPERATION:
-			ss << "The specified operation is not allowed in the current state.";
-			break;
-		case GL_INVALID_FRAMEBUFFER_OPERATION:
-			ss << "The framebuffer object is not complete.";
-			break;
-		case GL_OUT_OF_MEMORY:
-			ss << "There is not enough memory left to execute the command.";
-			break;
-		case GL_STACK_UNDERFLOW:
-			ss << "An attempt has been made to perform an operation that would cause an internal stack to underflow.";
-			break;
-		case GL_STACK_OVERFLOW:
-			ss << "An attempt has been made to perform an operation that would cause an internal stack to overflow.";
-			break;
-		default:
-			ss << "Unknown error (" << (int)error << ")";
-			break;
-	}
-
-	if (!extraMsg.empty())
-	{
-		ss << std::endl << extraMsg;
-	}
-
-	return ss.str();
-}
-
-OpenGLError::OpenGLError(GLenum error, const std::string &extraMsg)
-	: ShadertoyError(glErrorToString(error, extraMsg))
-{
-}
-
-namespace shadertoy
-{
-namespace OpenGL
-{
-	void CheckErrors()
-	{
-		GLenum error = glGetError();
-		if (error != GL_NO_ERROR)
-		{
-#if HAS_UNWIND
-			std::stringstream ss;
-			bool first = true;
-			char buf[256];
-
-			unw_cursor_t c;
-			unw_context_t ctxt;
-			unw_word_t ip, sp, off;
-			int ret;
-
-			ret = unw_getcontext(&ctxt);
-			if (ret)
-			{
-				// failed to get local context
-				goto unwind_end;
-			}
-
-			ret = unw_init_local(&c, &ctxt);
-			if (ret)
-			{
-				// failed to get cursor on context
-				goto unwind_end;
-			}
-
-			while (unw_step(&c) > 0)
-			{
-				unw_get_reg(&c, UNW_REG_IP, &ip);
-				unw_get_reg(&c, UNW_REG_SP, &sp);
-
-				ret = unw_get_proc_name(&c, &buf[0], sizeof(buf), &off);
-				if (first)
-				{
-					first = false;
-				}
-				else
-				{
-					if (ret != 0 && ret != UNW_ENOMEM)
-					{
-						ss << "Called from ?:" << std::hex << ip << ":?" << std::endl;
-					}
-					else
-					{
-						ss << "Called from " << buf << ":" << std::hex << ip << ":" << std::hex << off << std::endl;
-					}
-				}
-
-				if (strcmp("main", buf) == 0)
-					break;
-			}
-unwind_end:
-			throw OpenGLError(error, ss.str());
-#else
-			throw OpenGLError(error, std::string());
-#endif
-		}
-	}
-}
-}
diff --git a/src/OpenGL/Framebuffer.cpp b/src/OpenGL/Framebuffer.cpp
deleted file mode 100644
index 15349abf6d7beb3d45a68f125a34df19b0251794..0000000000000000000000000000000000000000
--- a/src/OpenGL/Framebuffer.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Texture.hpp"
-#include "shadertoy/OpenGL/Framebuffer.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullFramebufferError::NullFramebufferError()
-	: ShadertoyError("An attempt was made to dereference a null framebuffer")
-{
-}
-
-void Framebuffer::Bind(GLenum target)
-{
-	glCall(glBindFramebuffer, target, GLuint(*this));
-}
-
-void Framebuffer::Texture(GLenum attachment, shadertoy::OpenGL::Texture &texture, GLint level)
-{
-	glCall(glNamedFramebufferTexture, GLuint(*this), attachment, GLuint(texture), level);
-}
diff --git a/src/OpenGL/Program.cpp b/src/OpenGL/Program.cpp
deleted file mode 100644
index 6ee4322ba363587555cfd9f19a05cc8581d8af70..0000000000000000000000000000000000000000
--- a/src/OpenGL/Program.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Shader.hpp"
-#include "shadertoy/OpenGL/Program.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullProgramError::NullProgramError()
-	: ShadertoyError("An attempt was made to dereference a null program")
-{
-}
-
-UniformLocation::UniformLocation(const Program &program, GLint location)
-	: _program(GLuint(program)),
-	_location(location)
-{
-
-}
-
-bool UniformLocation::IsActive() const
-{
-	return _location != -1;
-}
-
-bool UniformLocation::SetValue(const GLint &v0)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform1i, _program, _location, v0);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(const GLfloat &v0)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform1f, _program, _location, v0);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(const glm::vec2 &v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform2f, _program, _location, v.x, v.y);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(const glm::vec3 &v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform3f, _program, _location, v.x, v.y, v.z);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(const glm::vec4 &v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform4f, _program, _location, v.x, v.y, v.z, v.w);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(size_t count, const GLint *v0)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform1iv, _program, _location, count, v0);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(size_t count, const GLfloat *v0)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform1fv, _program, _location, count, v0);
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(size_t count, const glm::vec2 *v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform2fv, _program, _location, count, reinterpret_cast<const GLfloat*>(v));
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(size_t count, const glm::vec3 *v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform3fv, _program, _location, count, reinterpret_cast<const GLfloat*>(v));
-		return true;
-	}
-
-	return false;
-}
-
-bool UniformLocation::SetValue(size_t count, const glm::vec4 *v)
-{
-	if (IsActive())
-	{
-		glCall(glProgramUniform4fv, _program, _location, count, reinterpret_cast<const GLfloat*>(v));
-		return true;
-	}
-
-	return false;
-}
-
-ProgramLinkError::ProgramLinkError(GLuint programId, const std::string &log)
-	: ShadertoyError("OpenGL program linking error"),
-	_programId(programId),
-	_log(log)
-{
-}
-
-ProgramValidateError::ProgramValidateError(GLuint programId, const std::string &log)
-	: ShadertoyError("OpenGL program validation error"),
-	_programId(programId),
-	_log(log)
-{
-}
-
-void Program::Link()
-{
-	glCall(glLinkProgram, GLuint(*this));
-
-	GLint linkStatus;
-	glCall(glGetProgramiv, GLuint(*this), GL_LINK_STATUS, &linkStatus);
-	if (linkStatus != GL_TRUE)
-	{
-		throw ProgramLinkError(GLuint(*this), this->Log());
-	}
-}
-
-void Program::Use()
-{
-	glCall(glUseProgram, GLuint(*this));
-}
-
-void Program::Validate()
-{
-	glCall(glValidateProgram, GLuint(*this));
-
-	GLint validateStatus;
-	glCall(glGetProgramiv, GLuint(*this), GL_LINK_STATUS, &validateStatus);
-	if (validateStatus != GL_TRUE)
-	{
-		throw ProgramValidateError(GLuint(*this), this->Log());
-	}
-}
-
-UniformLocation Program::GetUniformLocation(const GLchar *name)
-{
-	GLint location = glCall(glGetUniformLocation, GLuint(*this), name);
-	return UniformLocation(*this, location);
-}
-
-void Program::AttachShader(const Shader &shader)
-{
-	glCall(glAttachShader, GLuint(*this), GLuint(shader));
-}
-
-std::string Program::Log()
-{
-	// Get log length
-	GLint infoLogLength = 0;
-	glCall(glGetProgramiv, GLuint(*this), GL_INFO_LOG_LENGTH, &infoLogLength);
-
-	if (infoLogLength == 0)
-		return std::string();
-
-	// Get log
-	std::vector<GLchar> logStr(infoLogLength);
-	glCall(glGetProgramInfoLog, GLuint(*this), infoLogLength, nullptr, logStr.data());
-
-	// exclude the null character from the range passed to string constructor
-	return std::string(logStr.begin(), logStr.end() - 1);
-}
diff --git a/src/OpenGL/Query.cpp b/src/OpenGL/Query.cpp
deleted file mode 100644
index 157861533ca4a895f9b7b7cdf46899631338ff9c..0000000000000000000000000000000000000000
--- a/src/OpenGL/Query.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Query.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullQueryError::NullQueryError()
-	: ShadertoyError("An attempt was made to dereference a null query")
-{
-}
-
-GLuint QueryAllocator::Create(GLenum target)
-{
-	GLuint id;
-	glCall(glCreateQueries, target, 1, &id);
-	return id;
-}
-
-void QueryAllocator::Delete(GLuint resource)
-{
-	glCall(glDeleteQueries, 1, &resource);
-}
-
-Query::Query(GLenum target)
-	: Resource(Allocator().Create(target))
-{
-}
-
-void Query::Begin(GLenum target)
-{
-	glCall(glBeginQuery, target, GLuint(*this));
-}
-
-void Query::End(GLenum target)
-{
-	glCall(glEndQuery, target);
-}
-
-void Query::GetObjectiv(GLenum pname, GLint *params)
-{
-	glCall(glGetQueryObjectiv, GLuint(*this), pname, params);
-}
-
-void Query::GetObjectui64v(GLenum pname, GLuint64 *params)
-{
-	glCall(glGetQueryObjectui64v, GLuint(*this), pname, params);
-}
diff --git a/src/OpenGL/Renderbuffer.cpp b/src/OpenGL/Renderbuffer.cpp
deleted file mode 100644
index e54893eb89420326be5ff282002e893f314d667f..0000000000000000000000000000000000000000
--- a/src/OpenGL/Renderbuffer.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Renderbuffer.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullRenderbufferError::NullRenderbufferError()
-	: ShadertoyError("An attempt was made to dereference a null renderbuffer")
-{
-}
-
-void Renderbuffer::Bind(GLenum target)
-{
-	glCall(glBindRenderbuffer, target, GLuint(*this));
-}
-
-void Renderbuffer::Storage(GLenum internalFormat, GLsizei width, GLsizei height)
-{
-	glCall(glNamedRenderbufferStorage, GLuint(*this), internalFormat, width, height);
-}
diff --git a/src/OpenGL/Shader.cpp b/src/OpenGL/Shader.cpp
deleted file mode 100644
index 373271d39dc7456a4d45a02570758ee8e7bc5aa1..0000000000000000000000000000000000000000
--- a/src/OpenGL/Shader.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Caller.hpp"
-#include "shadertoy/OpenGL/Shader.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullShaderError::NullShaderError()
-	: ShadertoyError("An attempt was made to dereference a null shader")
-{
-}
-
-ShaderCompilationError::ShaderCompilationError(GLuint shaderId, const std::string &log)
-	: ShadertoyError("OpenGL shader compilation error"),
-	_shaderId(shaderId),
-	_log(log)
-{
-}
-
-GLuint ShaderAllocator::Create(GLenum shaderType)
-{
-	return glCall(glCreateShader, shaderType);
-}
-
-void ShaderAllocator::Delete(GLuint resource)
-{
-	glCall(glDeleteShader, resource);
-}
-
-Shader::Shader(GLenum shaderType)
-	: Resource(Allocator().Create(shaderType))
-{
-}
-
-void Shader::Source(const std::string &string)
-{
-	const GLchar *cstr = string.c_str();
-
-	glCall(glShaderSource, GLuint(*this), 1, &cstr, nullptr);
-}
-
-void Shader::Source(const std::vector<std::string> &string)
-{
-	std::vector<const char *> cstr(string.size());
-
-	std::transform(string.begin(), string.end(), cstr.begin(),
-		[] (const std::string &src) {
-			return src.c_str();
-		});
-
-	glCall(glShaderSource, GLuint(*this), string.size(), cstr.data(), nullptr);
-}
-
-void Shader::Compile()
-{
-	// Try to compile shader
-	glCall(glCompileShader, GLuint(*this));
-
-	// Get status
-	GLint compileStatus;
-	glCall(glGetShaderiv, GLuint(*this), GL_COMPILE_STATUS, &compileStatus);
-
-	// Throw error if shader could not be compiled
-	if (compileStatus != GL_TRUE)
-	{
-		throw ShaderCompilationError(GLuint(*this), this->Log());
-	}
-}
-
-std::string Shader::Log()
-{
-	// Get log length
-	GLint infoLogLength = 0;
-	glCall(glGetShaderiv, GLuint(*this), GL_INFO_LOG_LENGTH, &infoLogLength);
-
-	if (infoLogLength == 0)
-		return std::string();
-
-	// Get log
-	std::vector<GLchar> logStr(infoLogLength);
-	glCall(glGetShaderInfoLog, GLuint(*this), infoLogLength, nullptr, logStr.data());
-
-	// exclude the null character from the range passed to string constructor
-	return std::string(logStr.begin(), logStr.end() - 1);
-}
diff --git a/src/OpenGL/Texture.cpp b/src/OpenGL/Texture.cpp
deleted file mode 100644
index 91d34d1f4e58ace85e1aee912f950f418b75be5d..0000000000000000000000000000000000000000
--- a/src/OpenGL/Texture.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/Texture.hpp"
-
-using namespace shadertoy::OpenGL;
-
-NullTextureError::NullTextureError()
-	: ShadertoyError("An attempt was made to dereference a null texture")
-{
-}
-
-GLuint TextureAllocator::Create(GLenum target)
-{
-	GLuint res;
-	glCall(glCreateTextures, target, 1, &res);
-	return res;
-}
-
-void TextureAllocator::Delete(GLuint resource)
-{
-	glCall(glDeleteTextures, 1, &resource);
-}
-
-Texture::Texture(GLenum target)
-	: Resource(Allocator().Create(target))
-{
-}
-
-void Texture::Bind(GLenum target)
-{
-	glCall(glBindTexture, target, GLuint(*this));
-}
-
-void Texture::Parameter(GLenum pname, GLint param)
-{
-	glCall(glTextureParameteri, GLuint(*this), pname, param);
-}
-
-void Texture::Parameter(GLenum pname, GLfloat param)
-{
-	glCall(glTextureParameterf, GLuint(*this), pname, param);
-}
-
-void Texture::Image2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *data)
-{
-	glCall(glTextureImage2DEXT, GLuint(*this), target, level, internalFormat, width, height, border, format, type, data);
-}
-
-void Texture::GenerateMipmap()
-{
-	glCall(glGenerateTextureMipmap, GLuint(*this));
-}
diff --git a/src/RenderContext.cpp b/src/RenderContext.cpp
deleted file mode 100644
index c6721a71398f68aa979059240d86a4318df88311..0000000000000000000000000000000000000000
--- a/src/RenderContext.cpp
+++ /dev/null
@@ -1,431 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "Resources.h"
-#include "shadertoy/ContextConfig.hpp"
-#include "shadertoy/UniformState.hpp"
-#include "shadertoy/BufferConfig.hpp"
-#include "shadertoy/ToyBuffer.hpp"
-#include "shadertoy/TextureEngine.hpp"
-#include "shadertoy/ShaderCompiler.hpp"
-#include "shadertoy/RenderContext.hpp"
-
-namespace fs = boost::filesystem;
-using namespace std;
-using namespace shadertoy;
-using shadertoy::OpenGL::glCall;
-
-shared_ptr<TextureEngine> RenderContext::BuildTextureEngine()
-{
-	auto engine =  make_shared<TextureEngine>(config);
-
-	engine->RegisterHandler("buffer", InputHandler([this]
-		(const InputConfig &inputConfig,
-		 bool &skipTextureOptions,
-		 bool &skipCache,
-		 bool &framebufferSized)
-	{
-		skipTextureOptions = true;
-		skipCache = true;
-		// No need to reallocate buffer textures, this is handled by the buffer
-		// itself
-		framebufferSized = false;
-
-		auto &bufferConfigs = config.bufferConfigs;
-		auto bufferIt = bufferConfigs.find(inputConfig.source);
-
-		if (bufferIt == bufferConfigs.end())
-		{
-			BOOST_LOG_TRIVIAL(warning) << "buffer '" << inputConfig.source
-									   << "' not found for input " << inputConfig.id;
-			return shared_ptr<OpenGL::Texture>();
-		}
-		else
-		{
-			if (frameCount == 0)
-			{
-				BOOST_LOG_TRIVIAL(info) << "binding '" << inputConfig.source
-										<< "' to input " << inputConfig.id;
-			}
-
-			auto texture = buffers[inputConfig.source]->GetSourceTexture();
-
-			int minFilter = max((int)inputConfig.minFilter, GL_LINEAR),
-				magFilter = (int)inputConfig.magFilter;
-
-			texture->Parameter(GL_TEXTURE_MAG_FILTER, magFilter);
-			texture->Parameter(GL_TEXTURE_MIN_FILTER, minFilter);
-			texture->Parameter(GL_TEXTURE_WRAP_S, inputConfig.wrap);
-			texture->Parameter(GL_TEXTURE_WRAP_T, inputConfig.wrap);
-
-			return texture;
-		}
-	}));
-
-	return engine;
-}
-
-void RenderContext::PreInitializeBuffers()
-{
-}
-
-void RenderContext::PostInitializeBuffers()
-{
-}
-
-void RenderContext::LoadBufferSources(vector<pair<string, string>> &sources)
-{
-}
-
-void RenderContext::PostBufferRender(const string &name,
-									 shared_ptr<ToyBuffer> &buffer)
-{
-}
-
-void RenderContext::BindInputs(vector<shared_ptr<BoundInputsBase>> &inputs,
-							   OpenGL::Program &program)
-{
-}
-
-RenderContext::RenderContext(ContextConfig &config)
-	: config(config),
-	screenVs(GL_VERTEX_SHADER),
-	screenFs(GL_FRAGMENT_SHADER),
-	frameCount(0)
-{
-	textureEngine = BuildTextureEngine();
-}
-
-void RenderContext::Initialize()
-{
-	// Initialize constant uniforms
-	state.V<iResolution>() = glm::vec3(config.width, config.height, 1.0f);
-	// Note that this will be overriden once query measurements are available
-	state.V<iTimeDelta>() = 1.0f / (float) config.targetFramerate;
-	state.V<iFrameRate>() = (float) config.targetFramerate;
-
-	state.V<iChannel0>() = 1;
-	state.V<iChannel1>() = 2;
-	state.V<iChannel2>() = 3;
-	state.V<iChannel3>() = 4;
-
-	state.V<iChannelTime>() = { 0.f, 0.f, 0.f, 0.f };
-	state.V<iSampleRate>() = 48000.f;
-
-	// Compile screen quad vertex shader
-	screenVs.Source(string(screenQuad_vsh, screenQuad_vsh + screenQuad_vsh_size));
-	screenVs.Compile();
-
-	// Compile screen quad fragment shader
-	screenFs.Source(string(screenQuad_fsh, screenQuad_fsh + screenQuad_fsh_size));
-	screenFs.Compile();
-
-	// Prepare screen quad program
-	screenProg.AttachShader(screenVs);
-	screenProg.AttachShader(screenFs);
-
-	// Compile screen program
-	screenProg.Link();
-
-	// Setup screen textures
-	screenProg.Use();
-	screenProg.GetUniformLocation("screenTexture").SetValue(0);
-
-	// Initialize the texture engine
-	textureEngine->Initialize();
-
-	// Prepare screen quad geometry
-	GLfloat coords[] = {
-		-1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
-		-1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
-		1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
-		1.0f, -1.0f, 0.0f, 1.0f, 0.0f
-	};
-
-	GLuint indices[] = {
-		0, 1, 2,
-		0, 2, 3
-	};
-
-	// Setup coords
-	screenQuadCorners.Data(sizeof(coords),
-		static_cast<const GLvoid*>(&coords[0]), GL_STATIC_DRAW);
-
-	// Setup indices
-	screenQuadIndices.Data(sizeof(indices),
-		static_cast<const GLvoid*>(&indices[0]), GL_STATIC_DRAW);
-
-	// Initialize buffers
-	InitializeBuffers();
-}
-
-void RenderContext::InitializeBuffers()
-{
-	// Invoke callback
-	PreInitializeBuffers();
-
-	// Prepare the define wrapper
-	ostringstream oss;
-	for (auto define : config.preprocessorDefines)
-	{
-		oss << "#define " << define.first;
-		if (!define.second.empty()) {
-			oss << " " << define.second;
-		}
-		oss << endl;
-	}
-	defineWrapper = oss.str();
-
-	// Initialize program buffer
-	auto bufferConfigs = config.bufferConfigs;
-	for (auto it = bufferConfigs.begin(); it != bufferConfigs.end(); ++it)
-	{
-		auto buf = make_shared<ToyBuffer>(*this, it->first);
-		buf->Initialize(config.width, config.height);
-		buffers.insert(make_pair(it->first, buf));
-	}
-
-	// Setup position and texCoord attributes for shaders
-	screenQuadCorners.Bind(GL_ARRAY_BUFFER);
-	screenQuadIndices.Bind(GL_ELEMENT_ARRAY_BUFFER);
-
-	vector<OpenGL::Program *> programs{&screenProg};
-
-	GLint location;
-	for (auto it = programs.begin(); it != programs.end(); ++it)
-	{
-		// Bind input "position" to vertex locations (3 floats)
-		location = glCall(glGetAttribLocation, GLuint(**it), "position");
-		glCall(glVertexAttribPointer, location, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), (void*)0);
-		glCall(glEnableVertexAttribArray, location);
-
-		// Bind input "texCoord" to vertex texture coordinates (2 floats)
-		location = glCall(glGetAttribLocation, GLuint(**it), "texCoord");
-		glCall(glVertexAttribPointer, location, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), (void*)(3 * sizeof(GLfloat)));
-		glCall(glEnableVertexAttribArray, location);
-	}
-
-	lastTexture = weak_ptr<OpenGL::Texture>();
-
-	// Invoke callback
-	PostInitializeBuffers();
-}
-
-void RenderContext::AllocateTextures()
-{
-	// Drop the reference to screenQuadTexture, it will be recreated if needed
-	screenQuadTexture = shared_ptr<OpenGL::Texture>();
-
-	// Reallocate buffer textures
-	for (auto &pair : buffers)
-		pair.second->AllocateTextures(config.width, config.height);
-
-	// Reallocate inputs
-	textureEngine->ClearState(true);
-
-	// Update the iResolution uniform, as this method can be called after a
-	// framebuffer size change
-	state.V<iResolution>() = glm::vec3(config.width, config.height, 1.0f);
-}
-
-void RenderContext::ClearState()
-{
-	// Clear previous input textures
-	textureEngine->ClearState();
-	// Clear previous buffers
-	buffers.clear();
-	// Clear the source cache
-	sourceCache.clear();
-}
-
-void RenderContext::Render()
-{
-	for (auto pair : buffers)
-	{
-		pair.second->Render();
-		lastTexture = pair.second->GetSourceTexture();
-
-		PostBufferRender(pair.first, pair.second);
-	}
-
-	frameCount++;
-}
-
-void RenderContext::DoReadWriteCurrentFrame(GLuint &texIn, GLuint &texOut)
-{
-	if (auto currentTex = lastTexture.lock())
-	{
-		// Allocate the target screen quad texture as it is requested
-		if (!screenQuadTexture)
-		{
-			// Create texture object
-			screenQuadTexture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-
-			// Setup screenQuadTexture
-			screenQuadTexture->Parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-			screenQuadTexture->Parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-			screenQuadTexture->Parameter(GL_TEXTURE_WRAP_S, GL_REPEAT);
-			screenQuadTexture->Parameter(GL_TEXTURE_WRAP_T, GL_REPEAT);
-			screenQuadTexture->Image2D(GL_TEXTURE_2D, 0, GL_RGBA32F,
-				config.width, config.height, 0, GL_BGRA, GL_FLOAT, nullptr);
-		}
-
-		texIn = *currentTex;
-		texOut = *screenQuadTexture;
-
-		lastTexture = screenQuadTexture;
-	}
-	else
-	{
-		throw runtime_error("DoReadWriteCurrentFrame: lastTexture pointer has expired!");
-	}
-}
-
-void RenderContext::DoReadCurrentFrame(GLuint &texIn)
-{
-	if (auto currentTex = lastTexture.lock())
-	{
-		texIn = *currentTex;
-	}
-	else
-	{
-		throw runtime_error("DoReadCurrentFrame: lastTexture pointer has expired!");
-	}
-}
-
-void RenderContext::BuildBufferShader(const string &id,
-									  OpenGL::Shader &fs)
-{
-	auto &bufferConfig(config.bufferConfigs[id]);
-
-	// Load all source parts
-	ShaderCompiler compiler;
-	auto &sources(compiler.Sources());
-
-	// Load callback sources
-	LoadBufferSources(sources);
-
-	// Add define wrapper
-	sources.insert(sources.begin(),
-		make_pair(string("generated:define-wrapper"), defineWrapper));
-
-	// Add sources
-	for (auto &shaderFile : bufferConfig.shaderFiles)
-	{
-		sources.push_back(make_pair(shaderFile.string(), LoadShaderSource(shaderFile)));
-	}
-
-	// Add default wrapper around code
-	sources.insert(sources.begin(), make_pair(
-		string("internal:wrapper-header"),
-		string(wrapper_header_fsh, wrapper_header_fsh + wrapper_header_fsh_size)));
-
-	// Add source from uniform declarations
-	sources.insert(sources.begin() + 1, make_pair(
-		string("generated:shader-inputs"),
-		state.GetDefinitions()));
-
-	// Add footer
-	sources.push_back(make_pair(
-		string("internal:wrapper-footer"),
-		string(wrapper_footer_fsh, wrapper_footer_fsh + wrapper_footer_fsh_size)));
-
-	// Load sources into fragment shader and compile
-	compiler.Compile(fs);
-}
-
-const GLchar *RenderContext::LoadShaderSource(const fs::path &path) throw(runtime_error)
-{
-	fs::path shaderPath(fs::canonical(path));
-	ifstream src(shaderPath.string().c_str());
-	string loadedSource;
-	loadedSource.assign(istreambuf_iterator<char>(src), istreambuf_iterator<char>());
-	if (loadedSource.back() != '\n') {
-		loadedSource += "\n";
-	}
-	sourceCache.insert(make_pair(shaderPath.string(), loadedSource));
-
-	BOOST_LOG_TRIVIAL(info) << "loaded " << shaderPath;
-
-	return sourceCache.find(shaderPath.string())->second.c_str();
-}
-
-const GLchar *RenderContext::GetDefineWrapper() const
-{
-	return defineWrapper.c_str();
-}
-
-vector<shared_ptr<BoundInputsBase>> RenderContext::GetBoundInputs(OpenGL::Program &program)
-{
-	vector<shared_ptr<BoundInputsBase>> result;
-
-	// External inputs
-	BindInputs(result, program);
-
-	// Default inputs
-	result.insert(result.begin(), state.GetBoundInputs(program));
-
-	return result;
-}
-
-void RenderContext::Clear(float level)
-{
-	glCall(glViewport, 0, 0, config.width, config.height);
-	glCall(glClearColor, level, level, level, level);
-	glCall(glClear, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-}
-
-void RenderContext::RenderScreenQuad()
-{
-	screenQuadCorners.Bind(GL_ARRAY_BUFFER);
-	glCall(glDrawElements, GL_TRIANGLES, 3 * 2, GL_UNSIGNED_INT, nullptr);
-}
-
-void RenderContext::RenderScreenQuad(OpenGL::Query &timerQuery)
-{
-	screenQuadCorners.Bind(GL_ARRAY_BUFFER);
-
-	timerQuery.Begin(GL_TIME_ELAPSED);
-
-	glCall(glDrawElements, GL_TRIANGLES, 3 * 2, GL_UNSIGNED_INT, nullptr);
-
-	timerQuery.End(GL_TIME_ELAPSED);
-}
-
-void RenderContext::BindResult()
-{
-	// Prepare prog and texture
-	screenProg.Use();
-
-	glCall(glActiveTexture, GL_TEXTURE0);
-	lastTexture.lock()->Bind(GL_TEXTURE_2D);
-}
-
-OpenGL::Shader &RenderContext::GetScreenQuadVertexShader()
-{
-	return screenVs;
-}
-
-shared_ptr<ToyBuffer> RenderContext::GetBufferByName(const string &name)
-{
-	if (name.empty())
-	{
-		if (buffers.empty())
-		{
-			return shared_ptr<ToyBuffer>();
-		}
-
-		return buffers.rbegin()->second;
-	}
-	else
-	{
-		auto it = buffers.find(name);
-		if (it == buffers.end())
-		{
-			return shared_ptr<ToyBuffer>();
-		}
-
-		return it->second;
-	}
-}
diff --git a/src/ShaderCompiler.cpp b/src/ShaderCompiler.cpp
deleted file mode 100644
index 171ecbf3a8bc2af19596c1303de922576b8f0087..0000000000000000000000000000000000000000
--- a/src/ShaderCompiler.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "shadertoy/ShaderCompiler.hpp"
-
-using namespace std;
-using namespace shadertoy;
-
-ShaderCompiler::ShaderCompiler()
-	: namedSources()
-{
-}
-
-void ShaderCompiler::Compile(OpenGL::Shader &shader)
-{
-	// Transform pairs into list of C strings
-	vector<std::string> sources(namedSources.size());
-	transform(namedSources.begin(), namedSources.end(), sources.begin(),
-		[] (const pair<string, string> &namedSource) {
-			return namedSource.second;
-		});
-
-	// Also, build a line count
-	vector<int> lineCounts(namedSources.size());
-	transform(namedSources.begin(), namedSources.end(), lineCounts.begin(),
-		[] (const pair<string, string> &namedSource) {
-			return count(namedSource.second.begin(),
-						 namedSource.second.end(),
-						 '\n');
-		});
-
-	// Load sources in fragment shader and compile
-	try
-	{
-		shader.Source(sources);
-		shader.Compile();
-	}
-	catch (OpenGL::ShaderCompilationError &ex)
-	{
-		// Reparse log and replace sources with their actual names
-		std::stringstream is(ex.log()), os;
-		std::string msg;
-
-		while (!is.eof())
-		{
-			char c, d;
-			size_t pid, pline;
-
-			// Read one message
-			getline(is, msg);
-
-			// Try parsing message
-			std::stringstream msgis(msg);
-
-			// Matches ID(LINE.
-			//         ID:LINE.
-			msgis >> pid >> c >> pline >> d;
-
-			if (msgis.fail())
-			{
-				// Parsing failed
-				os << msg << endl;
-			}
-			else
-			{
-				// Parsing succeeded, find the source part which contains the
-				// actual error
-				size_t lc, lcn, li = 0;
-				for (lc = 0, lcn = 0;
-					 li < lineCounts.size();
-					 li++)
-				{
-					lc = lcn;
-					lcn += lineCounts.at(li);
-					if (lcn > pline) break;
-				}
-
-				// If li exceeds known programs, an error occurred, pass the
-				// message verbatim
-				if (li >= lineCounts.size())
-				{
-					os << msg << endl;
-					continue;
-				}
-
-				// Output a formatted message with the error
-				os << namedSources.at(li).first
-				   << c
-				   << (pline - lc)
-				   << d
-				   << msgis.rdbuf()
-				   << endl;
-			}
-		}
-
-		// Update exception and rethrow
-		throw OpenGL::ShaderCompilationError(GLuint(shader), os.str());
-	}
-}
diff --git a/src/ShadertoyError.cpp b/src/ShadertoyError.cpp
deleted file mode 100644
index ef392aa2dda2e0ff7cb67c9f13452d4e39d50180..0000000000000000000000000000000000000000
--- a/src/ShadertoyError.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-
-using namespace shadertoy;
-
-ShadertoyError::ShadertoyError(const std::string &what_arg)
-	: std::runtime_error(what_arg)
-{
-}
-
-ShadertoyError::ShadertoyError(const char *what_arg)
-	: std::runtime_error(what_arg)
-{
-}
diff --git a/src/TextureEngine.cpp b/src/TextureEngine.cpp
deleted file mode 100644
index cb6a6c60f148e414bc3fe2dd9c3a98ef9549f451..0000000000000000000000000000000000000000
--- a/src/TextureEngine.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "shadertoy/BufferConfig.hpp"
-#include "shadertoy/ContextConfig.hpp"
-#include "shadertoy/TextureEngine.hpp"
-
-using namespace std;
-using namespace std::placeholders;
-using namespace shadertoy;
-
-namespace fs = boost::filesystem;
-
-// Error message from SOIL
-extern "C" {
-extern char *result_string_pointer;
-}
-
-shared_ptr<OpenGL::Texture> TextureEngine::SOILTextureHandler(const InputConfig &inputConfig,
-													  bool &skipTextureOptions,
-													  bool &skipCache,
-													  bool &framebufferSized)
-{
-	if (inputConfig.source.empty())
-	{
-		BOOST_LOG_TRIVIAL(error) << "Missing source path for input "
-								 << inputConfig.id;
-		return shared_ptr<OpenGL::Texture>();
-	}
-
-	fs::path texPath(inputConfig.source);
-
-	if (!fs::exists(texPath))
-	{
-		BOOST_LOG_TRIVIAL(error) << texPath << " not found for input "
-								 << inputConfig.id;
-		return shared_ptr<OpenGL::Texture>();
-	}
-
-	shared_ptr<OpenGL::Texture> texture;
-	string ext(texPath.extension().string());
-	boost::algorithm::to_lower(ext);
-	if (ext.compare(".jpg") == 0 || ext.compare(".jpeg") == 0)
-	{
-		// use libjpeg
-		FILE *infile;
-		string sp(texPath.string());
-		if ((infile = fopen(sp.c_str(), "rb")) == NULL)
-		{
-			BOOST_LOG_TRIVIAL(error) << "could not open " << texPath
-									 << " for reading for input "
-									 << inputConfig.id;
-		}
-		else
-		{
-			struct jpeg_decompress_struct cinfo;
-			struct jpeg_error_mgr jerr;
-			cinfo.err = jpeg_std_error(&jerr);
-
-			jpeg_create_decompress(&cinfo);
-			jpeg_stdio_src(&cinfo, infile);
-
-			jpeg_read_header(&cinfo, TRUE);
-			jpeg_start_decompress(&cinfo);
-
-			bool decode = true;
-			GLenum fmt = GL_RGB;
-			if (cinfo.output_components == 1)
-				fmt = GL_RED;
-			else if (cinfo.output_components == 4)
-				fmt = GL_RGBA;
-			else if (cinfo.output_components != 3)
-			{
-				BOOST_LOG_TRIVIAL(error) << "unsupported component count for JPEG "
-										 << texPath << " for input " << inputConfig.id;
-				// Don't decode unknown format
-				decode = false;
-			}
-
-			if (decode)
-			{
-				int stride = cinfo.output_width * cinfo.output_components;
-				JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo,
-															   JPOOL_IMAGE,
-															   stride,
-															   1);
-				char *imgbuf = new char[cinfo.output_height * stride];
-
-				while (cinfo.output_scanline < cinfo.output_height)
-				{
-					JDIMENSION read_now = jpeg_read_scanlines(&cinfo, buffer, 1);
-					size_t off = cinfo.output_scanline - read_now;
-					if (inputConfig.vflip)
-						off = cinfo.output_height - off - read_now;
-					memcpy(&imgbuf[off * stride], buffer[0], stride);
-				}
-
-				texture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-				texture->Image2D(GL_TEXTURE_2D, 0, GL_RGBA32F, cinfo.output_width,
-					cinfo.output_height, 0, fmt, GL_UNSIGNED_BYTE, imgbuf);
-
-				delete[] imgbuf;
-			}
-
-			jpeg_finish_decompress(&cinfo);
-			jpeg_destroy_decompress(&cinfo);
-			fclose(infile);
-		}
-	}
-	else
-	{
-		// other, use SOIL
-		texture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-		GLuint texid = SOIL_load_OGL_texture(inputConfig.source.c_str(),
-											 SOIL_LOAD_AUTO,
-											 GLuint(*texture),
-											 inputConfig.vflip ? SOIL_FLAG_INVERT_Y : 0);
-		if (texid == 0)
-		{
-			BOOST_LOG_TRIVIAL(warning) << "failed to load '"
-									   << inputConfig.source << "' for input " << inputConfig.id
-									   << ": " << result_string_pointer;
-			texture = shared_ptr<OpenGL::Texture>();
-		}
-	}
-
-	if (texture)
-	{
-		BOOST_LOG_TRIVIAL(info) << "loaded '" << inputConfig.source
-								<< "' for input " << inputConfig.id;
-	}
-
-	return texture;
-}
-
-shared_ptr<OpenGL::Texture> TextureEngine::NoiseTextureHandler(const InputConfig &inputConfig,
-													   bool &skipTextureOptions,
-													   bool &skipCache,
-													   bool &framebufferSized)
-{
-	// A noise texture
-	auto noiseTexture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-	noiseTexture->Parameter(GL_TEXTURE_SWIZZLE_B, GL_RED);
-	noiseTexture->Parameter(GL_TEXTURE_SWIZZLE_G, GL_RED);
-
-	// Create the actual noise
-	vector<unsigned char> rnd(config.width * config.height);
-	generate(rnd.begin(), rnd.end(), []() { return rand() % 256; });
-
-	// Load it
-	noiseTexture->Image2D(GL_TEXTURE_2D, 0, GL_RED, config.width, config.height,
-		0, GL_RED, GL_UNSIGNED_BYTE, rnd.data());
-
-	BOOST_LOG_TRIVIAL(warning) << "generated noise texture for input "
-							   << inputConfig.id;
-
-	framebufferSized = true;
-
-	return noiseTexture;
-}
-
-shared_ptr<OpenGL::Texture> TextureEngine::CheckerTextureHandler(const InputConfig &inputConfig,
-														 bool &skipTextureOptions,
-														 bool &skipCache,
-														 bool &framebufferSized)
-{
-	stringstream ss(inputConfig.source);
-	int size = 0;
-	ss >> size;
-	if (ss.fail()) size = 10;
-
-	// A checkerboard texture
-	auto checkerTexture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-	checkerTexture->Parameter(GL_TEXTURE_SWIZZLE_B, GL_RED);
-	checkerTexture->Parameter(GL_TEXTURE_SWIZZLE_G, GL_RED);
-
-	// Generate the checkerboard
-	vector<unsigned char> chk(config.width * config.height);
-	for (int i = 0; i < config.width; ++i)
-		for (int j = 1; j < config.height; ++j)
-			chk[j * config.height + i] = ((i / size) % 2 == 0) ^ ((j / size) % 2 == 0) ? 255 : 0;
-
-	// Load it
-	checkerTexture->Image2D(GL_TEXTURE_2D, 0, GL_RED, config.width, config.height,
-		0, GL_RED, GL_UNSIGNED_BYTE, chk.data());
-
-	BOOST_LOG_TRIVIAL(warning) << "generated " << size << "x" << size
-							   <<" checker texture for input "
-							   << inputConfig.id;
-
-	framebufferSized = true;
-
-	return checkerTexture;
-}
-
-TextureEngine::TextureEngine(ContextConfig &config)
-	: config(config)
-{
-	RegisterHandler("texture", bind(&TextureEngine::SOILTextureHandler, this, _1, _2, _3, _4));
-	RegisterHandler("noise", bind(&TextureEngine::NoiseTextureHandler, this, _1, _2, _3, _4));
-	RegisterHandler("checker", bind(&TextureEngine::CheckerTextureHandler, this, _1, _2, _3, _4));
-}
-
-void TextureEngine::Initialize()
-{
-	// Prepare the empty texture, a nice magenta checkerboard
-	if (emptyTexture) return;
-
-	emptyTexture = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-
-	// Generate the checkerboard
-	int width = 32, height = 32,
-		size = 16;
-	vector<unsigned char> chk(width * height);
-	for (int i = 0; i < width; ++i)
-		for (int j = 1; j < height; ++j)
-			chk[j * height + i] = ((i / size) % 2 == 0) ^ ((j / size) % 2 == 0) ? 255 : 0;
-
-	// Load it and set parameters
-	emptyTexture->Parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-	emptyTexture->Parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-	emptyTexture->Parameter(GL_TEXTURE_WRAP_S, GL_REPEAT);
-	emptyTexture->Parameter(GL_TEXTURE_WRAP_T, GL_REPEAT);
-	emptyTexture->Parameter(GL_TEXTURE_SWIZZLE_B, GL_RED);
-	emptyTexture->Image2D(GL_TEXTURE_2D, 0, GL_RED, width, height, 0, GL_RED,
-		GL_UNSIGNED_BYTE, chk.data());
-}
-
-void TextureEngine::ClearState(bool framebufferSizeChange)
-{
-	if (!framebufferSizeChange)
-	{
-		// Clear all textures
-		inputTextures.clear();
-	}
-	else
-	{
-		// Clear only framebuffer textures
-		vector<string> clearTextures;
-
-		// Find framebuffer textures
-		for (auto &pair : inputTextures)
-		{
-			if (get<1>(pair.second))
-			{
-				clearTextures.push_back(pair.first);
-			}
-		}
-
-		// Clear textures
-		for (auto &obsoleteId : clearTextures)
-		{
-			inputTextures.erase(obsoleteId);
-		}
-	}
-}
-
-OpenGL::Texture &TextureEngine::GetInputTexture(const InputConfig &inputConfig)
-{
-	if (!inputConfig.enabled())
-	{
-		return *emptyTexture;
-	}
-
-	auto it = inputTextures.find(inputConfig.id);
-	if (it == inputTextures.end())
-	{
-		auto handlerIt = handlers.find(inputConfig.type);
-		if (handlerIt != handlers.end())
-		{
-			bool skipTextureOptions = false,
-				 skipCache = false,
-				 framebufferSized = false;
-			auto texture = handlerIt->second(inputConfig,
-											 skipTextureOptions,
-											 skipCache,
-											 framebufferSized);
-
-			if (texture)
-			{
-				if (!skipTextureOptions)
-					ApplyTextureOptions(inputConfig, *texture);
-
-				if (!skipCache)
-					inputTextures.insert(make_pair(inputConfig.id,
-						make_tuple(texture, framebufferSized)));
-				else
-					return *texture;
-			}
-			else
-			{
-				BOOST_LOG_TRIVIAL(error) << "failed loading " <<
-					inputConfig.type << " texture for input " << inputConfig.id;
-
-				if (!skipCache)
-					inputTextures.insert(make_pair(inputConfig.id,
-						make_tuple(emptyTexture, false)));
-				else
-					return *emptyTexture;
-			}
-		}
-		else
-		{
-			BOOST_LOG_TRIVIAL(error) << "unknown texture type "
-				<< inputConfig.type << " for input " << inputConfig.id;
-		}
-	}
-
-	return *get<0>(inputTextures.find(inputConfig.id)->second);
-}
-
-void TextureEngine::ApplyTextureOptions(const InputConfig &inputConfig, OpenGL::Texture &texture)
-{
-	GLint minFilter = inputConfig.minFilter;
-
-	texture.Parameter(GL_TEXTURE_MIN_FILTER, minFilter);
-	texture.Parameter(GL_TEXTURE_MAG_FILTER, inputConfig.magFilter);
-	texture.Parameter(GL_TEXTURE_WRAP_S, inputConfig.wrap);
-	texture.Parameter(GL_TEXTURE_WRAP_T, inputConfig.wrap);
-
-	if (minFilter > GL_LINEAR)
-	{
-		BOOST_LOG_TRIVIAL(debug) << "generating mipmaps for " << inputConfig.id;
-		texture.GenerateMipmap();
-	}
-}
-
-void TextureEngine::RegisterHandler(const string &name,
-									InputHandler handler)
-{
-	if (name.empty())
-		throw std::runtime_error("Input handler name cannot be empty.");
-
-	BOOST_LOG_TRIVIAL(debug) << "registered " << name << " texture handler";
-	handlers.insert(make_pair(name, handler));
-}
diff --git a/src/ToyBuffer.cpp b/src/ToyBuffer.cpp
deleted file mode 100644
index 1a222c8da75caffd084bdfaffd3a4bed5e0c77a0..0000000000000000000000000000000000000000
--- a/src/ToyBuffer.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "shadertoy/BufferConfig.hpp"
-#include "shadertoy/ContextConfig.hpp"
-#include "shadertoy/UniformState.hpp"
-#include "shadertoy/ToyBuffer.hpp"
-#include "shadertoy/TextureEngine.hpp"
-#include "shadertoy/RenderContext.hpp"
-
-#include "Resources.h"
-
-using namespace std;
-namespace fs = boost::filesystem;
-
-using namespace shadertoy;
-using shadertoy::OpenGL::glCall;
-
-ToyBuffer::ToyBuffer(RenderContext &context,
-					 const std::string &id)
-	: context(context),
-	  id(id),
-	  fs(GL_FRAGMENT_SHADER),
-	  boundInputs(),
-	  timeDeltaQuery(GL_TIME_ELAPSED)
-{
-}
-
-void ToyBuffer::Initialize(int width, int height)
-{
-	auto &config(context.GetConfig().bufferConfigs[id]);
-
-	// Attach the vertex shader for the screen quad
-	program.AttachShader(context.GetScreenQuadVertexShader());
-
-	// Load the fragment shader for this buffer
-	context.BuildBufferShader(id, fs);
-
-	// Attach shader
-	program.AttachShader(fs);
-
-	// Link the program
-	program.Link();
-
-	// Use the program
-	program.Use();
-
-	// Dump the program if requested
-	if (context.GetConfig().dumpShaders)
-	{
-		GLenum err;
-		// Get GL program id
-		GLuint progId = GLuint(program);
-		// Allocate buffer
-		GLint len, actLen;
-		glCall(glGetProgramiv, progId, GL_PROGRAM_BINARY_LENGTH, &len);
-
-		char *progBinary = new char[len];
-		// Get binary
-		GLenum format;
-		glGetProgramBinary(progId, len, &actLen, &format, progBinary);
-		if ((err = glGetError()) != GL_NO_ERROR)
-		{
-			delete[] progBinary;
-
-			std::stringstream ss;
-			ss << "could not get program binary: " << err;
-			throw std::runtime_error(ss.str());
-		}
-
-		// Store in file
-		fs::path name(config.shaderFiles.front());
-		name.replace_extension(".dump");
-		BOOST_LOG_TRIVIAL(info) << "dumping program binary to " << name;
-
-		ofstream ofs(name.string().c_str(), std::ofstream::binary);
-
-		if (!ofs.is_open())
-		{
-			delete[] progBinary;
-
-			std::stringstream ss;
-			ss << "could not open output file " << name.string();
-			throw std::runtime_error(ss.str());
-		}
-
-		ofs.write(progBinary, actLen);
-		ofs.close();
-		delete[] progBinary;
-	}
-
-	// Bind uniform inputs
-	boundInputs = context.GetBoundInputs(program);
-
-	// Allocate render textures
-	AllocateTextures(width, height);
-}
-
-void ToyBuffer::AllocateTextures(int width, int height)
-{
-	// Initialize buffer textures
-	InitializeRenderTexture(sourceTex, width, height);
-	InitializeRenderTexture(targetTex, width, height);
-
-	// Setup render buffers
-	targetTex->Bind(GL_TEXTURE_2D);
-	targetRbo.Bind(GL_RENDERBUFFER);
-	targetRbo.Storage(GL_DEPTH_COMPONENT, width, height);
-}
-
-void ToyBuffer::Render()
-{
-	auto &config(context.GetConfig().bufferConfigs[id]);
-
-	// Update renderbuffer to use the correct target texture
-	targetTex->Bind(GL_TEXTURE_2D);
-	targetRbo.Bind(GL_RENDERBUFFER);
-	targetFbo.Bind(GL_DRAW_FRAMEBUFFER);
-
-	targetFbo.Texture(GL_COLOR_ATTACHMENT0, *targetTex, 0);
-
-	// Prepare the render target
-	context.Clear(0.f);
-
-	// Setup program and its uniforms
-	program.Use();
-
-	// Override values in bound inputs 0 (ShaderToy inputs)
-	auto &resolutions(static_pointer_cast<ShaderInputsType::BoundInputs>(boundInputs[0])
-		->State.V<iChannelResolution>());
-
-	// Setup the texture targets
-	for (int i = 0; i < 4; ++i)
-	{
-		glCall(glActiveTexture, GL_TEXTURE0 + i + 1);
-		// Following have side effects, ensure it runs after we selected the new
-		// texture unit
-		auto &texture = context.GetTextureEngine()
-							   .GetInputTexture(config.inputConfig[i]);
-		texture.Bind(GL_TEXTURE_2D);
-
-		glCall(glGetTexLevelParameterfv, GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &resolutions[i][0]);
-		glCall(glGetTexLevelParameterfv, GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &resolutions[i][1]);
-		resolutions[i][2] = 1.0f;
-	}
-
-	// Try to set iTimeDelta
-	GLint available = 0;
-	timeDeltaQuery.GetObjectiv(GL_QUERY_RESULT_AVAILABLE, &available);
-	if (available)
-	{
-		// Result available, set uniform value
-		GLuint64 timeDelta;
-		timeDeltaQuery.GetObjectui64v(GL_QUERY_RESULT, &timeDelta);
-		static_pointer_cast<ShaderInputsType::BoundInputs>(boundInputs[0])
-			->State.V<iTimeDelta>() = timeDelta / 1e9;
-	}
-
-	// Set all uniforms
-	for (auto &inputs : boundInputs)
-		inputs->Apply();
-
-	// Render the program
-	context.RenderScreenQuad(timeDeltaQuery);
-
-	// Swap texture object pointers
-	swap(sourceTex, targetTex);
-}
-
-unsigned long long ToyBuffer::GetElapsedTime()
-{
-	GLint available = 0;
-
-	// Wait for result to be available
-	while (!available)
-	{
-		timeDeltaQuery.GetObjectiv(GL_QUERY_RESULT_AVAILABLE, &available);
-	}
-
-	// Fetch result
-	GLuint64 result;
-	timeDeltaQuery.GetObjectui64v(GL_QUERY_RESULT, &result);
-
-	return result;
-}
-
-void ToyBuffer::InitializeRenderTexture(shared_ptr<OpenGL::Texture> &texptr, int width, int height)
-{
-	// Only create a texture object if it is necessary
-	if (!texptr)
-		texptr = make_shared<OpenGL::Texture>(GL_TEXTURE_2D);
-
-	// Allocate texture storage according to width/height
-	texptr->Parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-	texptr->Parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-	texptr->Parameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-	texptr->Parameter(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-	texptr->Image2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height, 0, GL_BGRA,
-		GL_UNSIGNED_BYTE, nullptr);
-
-	// Clear the frame accumulator so it doesn't contain garbage
-	float black[4] = {0.f};
-	glCall(glClearTexImage, GLuint(*texptr),
-		0,
-		GL_BGRA,
-		GL_FLOAT,
-		black);
-}
diff --git a/src/UniformState.cpp b/src/UniformState.cpp
deleted file mode 100644
index bf9263d72041b5f98a9c9568a93438aa9b0006f2..0000000000000000000000000000000000000000
--- a/src/UniformState.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "stdafx.hpp"
-#include "shadertoy/ShadertoyError.hpp"
-#include "shadertoy/OpenGL/OpenGL.hpp"
-
-#include "shadertoy/UniformState.hpp"
-
-#define IMPLEMENT_UNIFORM_STATE
-#include "shadertoy/UniformState_impl.hpp"
diff --git a/src/stdafx.cpp b/src/stdafx.cpp
deleted file mode 100644
index 7845e6a58e34f70dd6b51186f7bc470c485767e9..0000000000000000000000000000000000000000
--- a/src/stdafx.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "stdafx.hpp"