mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Fixed Geometry:flip
This commit is contained in:
@@ -133,6 +133,13 @@ void Geometry::setVertex(size_t i, const vertex &v)
|
||||
|
||||
void Geometry::flip(bool x, bool y)
|
||||
{
|
||||
for (size_t i = 0; i < polygon.size(); ++i)
|
||||
{
|
||||
vertex &v = polygon[i];
|
||||
if (x) v.x = x_max + x_min - v.x;
|
||||
if (y) v.y = y_max + y_min - v.y;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < vertexCount; ++i)
|
||||
{
|
||||
vertex &v = vertexArray[i];
|
||||
|
||||
@@ -65,7 +65,7 @@ struct FramebufferStrategy
|
||||
/**
|
||||
* @param[in] canvases List of canvases to attach
|
||||
**/
|
||||
virtual void setAttachments(const std::vector<Canvas *> &canvases) { (void)canvases; }
|
||||
virtual void setAttachments(const std::vector<Canvas *> &) {}
|
||||
|
||||
/// stop using all additional attached canvases
|
||||
virtual void setAttachments() {}
|
||||
|
||||
Reference in New Issue
Block a user