mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- Fixed: R_GetColumn() needs to clamp negative column indexes to be inside the texture if the
texture's width isn't a power of 2. SVN r3881 (trunk)
This commit is contained in:
parent
12e1901150
commit
934c27d34a
1 changed files with 8 additions and 0 deletions
|
@ -2153,6 +2153,14 @@ void tmvline4_revsubclamp ()
|
|||
|
||||
const BYTE *R_GetColumn (FTexture *tex, int col)
|
||||
{
|
||||
int width;
|
||||
|
||||
// If the texture's width isn't a power of 2, then we need to make it a
|
||||
// positive offset for proper clamping.
|
||||
if (col < 0 && (width = tex->GetWidth()) != (1 << tex->WidthBits))
|
||||
{
|
||||
col = width + (col % width);
|
||||
}
|
||||
return tex->GetColumn (col, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue