mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-12-13 14:11:35 +00:00
bring in relnev's texture wrapping fix
This commit is contained in:
parent
f4fa61bf44
commit
d051c7114d
1 changed files with 5 additions and 5 deletions
|
@ -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 ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue