X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpostprocessor.cpp;h=26330a4d08b3d03a1f5df88711e681f519482327;hp=6c9408cb00db48772d361bfa8b5754338ea00c30;hb=6a045019fbd68738b77849629e6dfd3dfd9a4d93;hpb=9733137499a84f44c29d06d2551d41a903de1112 diff --git a/source/postprocessor.cpp b/source/postprocessor.cpp index 6c9408cb..26330a4d 100644 --- a/source/postprocessor.cpp +++ b/source/postprocessor.cpp @@ -6,11 +6,12 @@ namespace { const char fullscreen_vs_source[] = + "attribute vec4 vertex;\n" "varying vec2 texcoord;\n" "void main()\n" "{\n" - " gl_Position = gl_Vertex;\n" - " texcoord = gl_Vertex.xy*0.5+0.5;\n" + " gl_Position = vertex;\n" + " texcoord = vertex.xy*0.5+0.5;\n" "}\n"; } @@ -19,6 +20,11 @@ const char fullscreen_vs_source[] = namespace Msp { namespace GL { +void PostProcessor::render(Renderer &, const Texture2D &color, const Texture2D &depth) +{ + render(color, depth); +} + Shader &PostProcessor::get_fullscreen_vertex_shader() { static VertexShader shader(fullscreen_vs_source); @@ -33,7 +39,7 @@ const Mesh &PostProcessor::get_fullscreen_quad() const Mesh &PostProcessor::create_fullscreen_quad() { - static Mesh mesh(GL::VERTEX2); + static Mesh mesh(VERTEX2); MeshBuilder builder(mesh); builder.begin(TRIANGLE_STRIP); builder.vertex(-1, 1);