Commits

Alex Szpakowski committed 03213b7

Fixed Geometry:flip

  • Participants
  • Parent commits d18b612

Comments (0)

Files changed (2)

File src/modules/graphics/Geometry.cpp

 
 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];

File src/modules/graphics/opengl/Canvas.cpp

 	/**
 	 * @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() {}