From 8b93b07db3fa13d965e338633851ce314f69f7a1 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 26 Nov 2011 16:46:44 +0100 Subject: [PATCH] Refresh texture when redrawing console We need to refresh the GL texture data when redrawing the console. Otherwise, we always end up with the first frame mapped onto the GL quad object. Signed-off-by: David Herrmann --- src/console.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/console.c b/src/console.c index aff870a..b70eca9 100644 --- a/src/console.c +++ b/src/console.c @@ -214,6 +214,12 @@ void kmscon_console_draw(struct kmscon_console *con) // TODO: draw console here cairo_restore(con->cr); + + /* refresh GL texture contents */ + glBindTexture(GL_TEXTURE_RECTANGLE, con->tex); + glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, con->res_x, con->res_y, + 0, GL_BGRA, GL_UNSIGNED_BYTE, con->surf_buf); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); } /*