summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-18 18:13:46 -0500
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-11-18 18:13:46 -0500
commit028dfbac863e9c77e12904bf14d19726f53df279 (patch)
treebc21a3fa97b9c2b8bda59993b6d96e0fa3d7bf39
parent740f2b459e38ae26d244980851ce27caf059cbb4 (diff)
Fix texture coordinates.HEADmaster
-rw-r--r--plugins/flask.c11
1 files 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;