bring in relnev's texture wrapping fix

This commit is contained in:
Bill Currie 2001-12-29 04:55:10 +00:00
parent f4fa61bf44
commit d051c7114d

View file

@ -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 ();