mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012407 - Part 9: Normalize texture coordinates in DecomposeIntoNoRepeatRects (r=BenWa)
This commit is contained in:
parent
64c4381b8e
commit
1807413f5e
@ -384,6 +384,14 @@ DecomposeIntoNoRepeatRects(const Rect& aRect,
|
||||
{
|
||||
Rect texCoordRect = aTexCoordRect;
|
||||
|
||||
// We want to normalize here instead of clamp because the rects we were
|
||||
// given assume GL_REPEAT, which we explicitly won't use and instead
|
||||
// manually split into sub-rects.
|
||||
while (texCoordRect.x >= 1.0f)
|
||||
texCoordRect.x -= 1.0f;
|
||||
while (texCoordRect.y >= 1.0f)
|
||||
texCoordRect.y -= 1.0f;
|
||||
|
||||
// If the texture should be flipped, it will have negative height. Detect that
|
||||
// here and compensate for it. We will flip each rect as we emit it.
|
||||
bool flipped = false;
|
||||
|
Loading…
Reference in New Issue
Block a user