From d051c7114d54240c8acd5b8ac8b81337f2fadbe0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 29 Dec 2001 04:55:10 +0000 Subject: [PATCH] bring in relnev's texture wrapping fix --- ref_gl/gl_draw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ref_gl/gl_draw.c b/ref_gl/gl_draw.c index 159eaac..d194b99 100644 --- a/ref_gl/gl_draw.c +++ b/ref_gl/gl_draw.c @@ -339,7 +339,7 @@ void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data hscale = rows/256.0; trows = 256; } - t = rows*hscale / 256; + t = rows*hscale / 256 - 1.0/512.0; if ( !qglColorTableEXT ) { @@ -399,13 +399,13 @@ void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data qglDisable (GL_ALPHA_TEST); qglBegin (GL_QUADS); - qglTexCoord2f (0, 0); + qglTexCoord2f (1.0/512.0, 1.0/512.0); qglVertex2f (x, y); - qglTexCoord2f (1, 0); + qglTexCoord2f (511.0/512.0, 1.0/512.0); qglVertex2f (x+w, y); - qglTexCoord2f (1, t); + qglTexCoord2f (511.0/512.0, t); qglVertex2f (x+w, y+h); - qglTexCoord2f (0, t); + qglTexCoord2f (1.0/512.0, t); qglVertex2f (x, y+h); qglEnd ();