فهرست منبع

Fixed lines drawn using the 'none' line join mode having missing sections of each line segment.

Alex Szpakowski 10 سال پیش
والد
کامیت
5c49898cdf
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 2 2
      src/modules/font/Font.cpp
  2. 3 2
      src/modules/graphics/opengl/Polyline.cpp

+ 2 - 2
src/modules/font/Font.cpp

@@ -37,8 +37,8 @@ class DefaultFontData : public love::Data
 {
 {
 public:
 public:
 
 
-	virtual void *getData() const { return Vera_ttf; }
-	virtual size_t getSize() const { return sizeof(Vera_ttf); }
+	void *getData() const override { return Vera_ttf; }
+	size_t getSize() const override { return sizeof(Vera_ttf); }
 };
 };
 
 
 Rasterizer *Font::newTrueTypeRasterizer(int size, TrueTypeRasterizer::Hinting hinting)
 Rasterizer *Font::newTrueTypeRasterizer(int size, TrueTypeRasterizer::Hinting hinting)

+ 3 - 2
src/modules/graphics/opengl/Polyline.cpp

@@ -349,6 +349,7 @@ void Polyline::draw()
 		}
 		}
 
 
 		// Fill the index array to make 2 triangles from each quad.
 		// Fill the index array to make 2 triangles from each quad.
+		// NOTE: The triangle vertex ordering here is important!
 		for (size_t i = 0; i < numindices / 6; i++)
 		for (size_t i = 0; i < numindices / 6; i++)
 		{
 		{
 			// First triangle.
 			// First triangle.
@@ -357,8 +358,8 @@ void Polyline::draw()
 			indices[i * 6 + 2] = GLushort(i * 4 + 2);
 			indices[i * 6 + 2] = GLushort(i * 4 + 2);
 
 
 			// Second triangle.
 			// Second triangle.
-			indices[i * 6 + 3] = GLushort(i * 4 + 2);
-			indices[i * 6 + 4] = GLushort(i * 4 + 1);
+			indices[i * 6 + 3] = GLushort(i * 4 + 0);
+			indices[i * 6 + 4] = GLushort(i * 4 + 2);
 			indices[i * 6 + 5] = GLushort(i * 4 + 3);
 			indices[i * 6 + 5] = GLushort(i * 4 + 3);
 		}
 		}
 	}
 	}