2 #include "meshbuilder.h"
3 #include "postprocessor.h"
8 const char fullscreen_vs_source[] =
9 "varying vec2 texcoord;\n"
12 " gl_Position = gl_Vertex;\n"
13 " texcoord = gl_Vertex.xy*0.5+0.5;\n"
22 Shader &PostProcessor::get_fullscreen_vertex_shader()
24 static Shader shader(VERTEX_SHADER, fullscreen_vs_source);
28 const Mesh &PostProcessor::get_fullscreen_quad()
30 static const Mesh &mesh = create_fullscreen_quad();
34 const Mesh &PostProcessor::create_fullscreen_quad()
36 static Mesh mesh(GL::VERTEX2);
37 MeshBuilder builder(mesh);
38 builder.begin(TRIANGLE_STRIP);
39 builder.vertex(-1, 1);
40 builder.vertex(-1, -1);
42 builder.vertex(1, -1);