From 028dfbac863e9c77e12904bf14d19726f53df279 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 18 Nov 2009 18:13:46 -0500 Subject: Fix texture coordinates. --- plugins/flask.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/flask.c b/plugins/flask.c index c71e636..3a90185 100644 --- a/plugins/flask.c +++ b/plugins/flask.c @@ -133,6 +133,7 @@ flaskPaintOutput (CompScreen *s, { Bool status; float width, height, x1, x2, y1, y2; + GLint mmode; FLASK_SCREEN (s); @@ -142,7 +143,10 @@ flaskPaintOutput (CompScreen *s, if (status && as->texture && region->numRects) { + glGetIntegerv(GL_MATRIX_MODE, &mmode); + glMatrixMode (GL_TEXTURE); glPushMatrix (); + glLoadIdentity (); enableTexture (s, &as->texture->texture, COMP_TEXTURE_FILTER_FAST); @@ -155,13 +159,13 @@ flaskPaintOutput (CompScreen *s, y2 = height - 2.0f; glBegin(GL_QUADS); - glTexCoord2i(0, as->height); + glTexCoord2i(0, 1); glVertex3f(x1, y1, -4.0f); - glTexCoord2i(as->width, as->height); + glTexCoord2i(1, 1); glVertex3f(x2, y1, -4.0f); - glTexCoord2i(as->width, 0); + glTexCoord2i(1, 0); glVertex3f(x2, y2, -4.0f); glTexCoord2i(0, 0); @@ -174,6 +178,7 @@ flaskPaintOutput (CompScreen *s, glFlush(); glPopMatrix (); + glMatrixMode (mmode); } return status; -- cgit v1.2.3