From ffe859c4a969af0c128f2786c2aa11cd9f025d19 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 9 Jun 2003 01:09:50 +0000 Subject: [PATCH] proper co-ords for padded textures --- render2/texture.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/render2/texture.c b/render2/texture.c index 2e65754a..36486d79 100644 --- a/render2/texture.c +++ b/render2/texture.c @@ -125,13 +125,14 @@ void RrTexturePaint(struct RrSurface *sur, struct RrTexture *tex, glBegin(GL_TRIANGLES); glTexCoord2f(0, 0); glVertex2i(x, y); - glTexCoord2f(1, 0); + glTexCoord2f(w/(float)tex->data.rgba.padw, 0); glVertex2i(x+w, y); - glTexCoord2f(1, 1); + glTexCoord2f(w/(float)tex->data.rgba.padw, + h/(float)tex->data.rgba.padh); glVertex2i(x+w, y+h); glVertex2i(x+w, y+h); - glTexCoord2f(0, 1); + glTexCoord2f(0, h/(float)tex->data.rgba.padh); glVertex2i(x, y+h); glTexCoord2f(0, 0); glVertex2i(x, y); -- 2.34.1