2 #include "meshbuilder.h"
3 #include "postprocessor.h"
8 const char fullscreen_vs_source[] =
9 "attribute vec4 vertex;\n"
10 "varying vec2 texcoord;\n"
13 " gl_Position = vertex;\n"
14 " texcoord = vertex.xy*0.5+0.5;\n"
23 Shader &PostProcessor::get_fullscreen_vertex_shader()
25 static VertexShader shader(fullscreen_vs_source);
29 const Mesh &PostProcessor::get_fullscreen_quad()
31 static const Mesh &mesh = create_fullscreen_quad();
35 const Mesh &PostProcessor::create_fullscreen_quad()
37 static Mesh mesh(VERTEX2);
38 MeshBuilder builder(mesh);
39 builder.begin(TRIANGLE_STRIP);
40 builder.vertex(-1, 1);
41 builder.vertex(-1, -1);
43 builder.vertex(1, -1);