simple-dmabuf-feedback: Correct the rectangle orientation

Similar to changes in simple-dmabuf-egl, this perform a x-axis
reflection as it has the same NDC values as simple-dmabuf-egl and we get
an inverted image. We do it straight in the shader this time.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2022-11-03 16:17:50 +02:00
parent 9b455e24a2
commit 75b6758fd2

View File

@ -68,7 +68,10 @@ static const char *vert_shader_text =
"attribute vec4 color;\n"
"varying vec4 v_color;\n"
"void main() {\n"
" gl_Position = pos;\n"
" // We need to render upside-down, because rendering through an\n"
" // FBO causes the bottom of the image to be written to the top\n"
" // pixel row of the buffer, y-flipping the image.\n"
" gl_Position = vec4(1.0, -1.0f, 1.0f, 1.0f) * pos;\n"
" v_color = color;\n"
"}\n";