mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Add a extern vec2 love_ScreenSize to the pixel effects that will be (re)set upon PixelEffect::loadVolatile() and is used to flip the fragment coordinate. Unfixes #324 because canvases can have different dimensions than the screen.
This commit is contained in:
@@ -113,17 +113,6 @@ void Quad::flip(bool x, bool y)
|
||||
}
|
||||
}
|
||||
|
||||
void Quad::mirror(bool x, bool y)
|
||||
{
|
||||
for (size_t i = 0; i < NUM_VERTICES; ++i)
|
||||
{
|
||||
if (x)
|
||||
vertices[i].s = 1.0f - vertices[i].s;
|
||||
if (y)
|
||||
vertices[i].t = 1.0f - vertices[i].t;
|
||||
}
|
||||
}
|
||||
|
||||
const vertex *Quad::getVertices() const
|
||||
{
|
||||
return vertices;
|
||||
|
||||
Reference in New Issue
Block a user