summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2013-01-11 19:18:15 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2013-01-11 19:18:15 +0100
commit5853a5c97ac3b7748d08085a45ab298a1ba402fa (patch)
tree0d2c2ee4df27b3ff926d68ac6047ffbf09aeecb3 /src
parent4965a957b3b7dea88dad205392991f3f756ec480 (diff)
uterm: drm: fix y-inversion bug
OpenGL uses an inverted y-axis by default. However, the old gbm-surface layer didn't correctly map this. But with the conversion to gbm_surface objects, we now have the correct OpenGL framebuffers so we have to invert the y-axis. This was already fixed for the gltex renderer earlier but we forgot to fix the uterm-drm blitting backend. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/uterm_video_drm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/uterm_video_drm.c b/src/uterm_video_drm.c
index 2c22543..b5c4d8a 100644
--- a/src/uterm_video_drm.c
+++ b/src/uterm_video_drm.c
@@ -671,18 +671,18 @@ static int display_blend(struct uterm_display *disp,
vertices[11] = -1.0;
texpos[0] = 0.0;
- texpos[1] = 0.0;
+ texpos[1] = 1.0;
texpos[2] = 0.0;
- texpos[3] = 1.0;
+ texpos[3] = 0.0;
texpos[4] = 1.0;
- texpos[5] = 1.0;
+ texpos[5] = 0.0;
texpos[6] = 0.0;
- texpos[7] = 0.0;
+ texpos[7] = 1.0;
texpos[8] = 1.0;
- texpos[9] = 1.0;
+ texpos[9] = 0.0;
texpos[10] = 1.0;
- texpos[11] = 0.0;
+ texpos[11] = 1.0;
fgcol[0] = fr / 255.0;
fgcol[1] = fg / 255.0;
@@ -707,7 +707,7 @@ static int display_blend(struct uterm_display *disp,
else
height = buf->height;
- glViewport(x, y, width, height);
+ glViewport(x, sh - y - height, width, height);
glDisable(GL_BLEND);
gl_shader_use(disp->video->drm.blend_shader);