Save the current state of the cairo context before drawing and restore once finished.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5588 4a71c877-e1ca-e34f-864e-861f7616d084
master
Freddie Witherden 2008-07-19 19:34:51 +00:00
parent 1b8a62deca
commit 4c2fedaff6
1 changed files with 6 additions and 0 deletions

View File

@ -253,9 +253,15 @@ void widgetDraw(widget *self)
// Restore the compositing operator back to the default
cairo_set_operator(self->cr, CAIRO_OPERATOR_OVER);
// Save (push) the current context
cairo_save(self->cr);
// Redaw ourself
widgetDoDraw(self);
// Restore the context
cairo_restore(self->cr);
// Update the texture
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, self->textureId);