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 <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2011-11-26 16:46:44 +01:00
parent 27047fddbf
commit 8b93b07db3

View File

@ -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);
}
/*