From: Derek Foreman Date: Sun, 8 Jun 2003 23:37:58 +0000 (+0000) Subject: add texcoords X-Git-Tag: gl-oldtheme~28 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d86c4be9a46e2388e8cbbb31ebdbccfb21d36705;p=dana%2Fopenbox.git add texcoords --- diff --git a/render2/texture.c b/render2/texture.c index 97570ed7..fc55d1b4 100644 --- a/render2/texture.c +++ b/render2/texture.c @@ -100,12 +100,17 @@ void RrTexturePaint(struct RrSurface *sur, struct RrTexture *tex, glColor3f(1.0, 1.0, 1.0); glBindTexture(GL_TEXTURE_2D, tex->data.rgba.texid); glBegin(GL_TRIANGLES); + glTexCoord2f(0, 0); glVertex2i(x, y); - glVertex2i(x+w, y); - glVertex2i(x+w, y+h); + glTexCoord2f(1, 0); + glVertex2i(x+w - 1, y); + glTexCoord2f(1, 1); + glVertex2i(x+w - 1, y+h - 1); - glVertex2i(x+w, y+h); - glVertex2i(x, y+h); + glVertex2i(x+w - 1, y+h - 1); + glTexCoord2f(0, 1); + glVertex2i(x, y+h - 1); + glTexCoord2f(0, 0); glVertex2i(x, y); glEnd();