aboutsummaryrefslogtreecommitdiff
path: root/ui/shader/texture-blit-flip.vert
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-10-10 15:54:50 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-10-17 10:25:42 +0200
commit2e1d70b9e03ca3f1c6185b54010bc9e47e0a0d0c (patch)
tree98f4a8f35a8a696ddcae2a20ea87db4425c8d396 /ui/shader/texture-blit-flip.vert
parent46e19e149f3b129a22c440caba853188df67deab (diff)
downloadqemu-2e1d70b9e03ca3f1c6185b54010bc9e47e0a0d0c.zip
qemu-2e1d70b9e03ca3f1c6185b54010bc9e47e0a0d0c.tar.gz
qemu-2e1d70b9e03ca3f1c6185b54010bc9e47e0a0d0c.tar.bz2
opengl: add flipping vertex shader
Add vertex shader which flips the texture upside down while blitting it. Add argument to qemu_gl_run_texture_blit() to enable flipping. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-4-kraxel@redhat.com
Diffstat (limited to 'ui/shader/texture-blit-flip.vert')
-rw-r--r--ui/shader/texture-blit-flip.vert10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/shader/texture-blit-flip.vert b/ui/shader/texture-blit-flip.vert
new file mode 100644
index 0000000..ba081fa
--- /dev/null
+++ b/ui/shader/texture-blit-flip.vert
@@ -0,0 +1,10 @@
+
+#version 300 es
+
+in vec2 in_position;
+out vec2 ex_tex_coord;
+
+void main(void) {
+ gl_Position = vec4(in_position, 0.0, 1.0);
+ ex_tex_coord = vec2(1.0 + in_position.x, 1.0 + in_position.y) * 0.5;
+}