mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-12-14 06:31:20 +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;
|
hscale = rows/256.0;
|
||||||
trows = 256;
|
trows = 256;
|
||||||
}
|
}
|
||||||
t = rows*hscale / 256;
|
t = rows*hscale / 256 - 1.0/512.0;
|
||||||
|
|
||||||
if ( !qglColorTableEXT )
|
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);
|
qglDisable (GL_ALPHA_TEST);
|
||||||
|
|
||||||
qglBegin (GL_QUADS);
|
qglBegin (GL_QUADS);
|
||||||
qglTexCoord2f (0, 0);
|
qglTexCoord2f (1.0/512.0, 1.0/512.0);
|
||||||
qglVertex2f (x, y);
|
qglVertex2f (x, y);
|
||||||
qglTexCoord2f (1, 0);
|
qglTexCoord2f (511.0/512.0, 1.0/512.0);
|
||||||
qglVertex2f (x+w, y);
|
qglVertex2f (x+w, y);
|
||||||
qglTexCoord2f (1, t);
|
qglTexCoord2f (511.0/512.0, t);
|
||||||
qglVertex2f (x+w, y+h);
|
qglVertex2f (x+w, y+h);
|
||||||
qglTexCoord2f (0, t);
|
qglTexCoord2f (1.0/512.0, t);
|
||||||
qglVertex2f (x, y+h);
|
qglVertex2f (x, y+h);
|
||||||
qglEnd ();
|
qglEnd ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue