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>
// TODO: draw console here
cairo_restore(con->cr);
// 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);