Use automatic batching for love.graphics.print/printf.

This doesn’t actually improve performance at all in most cases, but it does remove some OpenGL-specific code from the Font files, and reduces the amount of duplicated rendering code. This makes it slightly easier to add support for Core Profile OpenGL 3.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-12-29 00:25:14 -04:00
parent 52b7b0f80d
commit 4a3889ae48
8 changed files with 116 additions and 113 deletions
+5 -9
View File
@@ -39,13 +39,6 @@ enum BufferType
BUFFER_MAX_ENUM
};
struct Vertex
{
float x, y;
float s, t;
Color color;
};
namespace vertex
{
@@ -88,9 +81,9 @@ struct XYf_STf_RGBAub
struct XYf_STus_RGBAub
{
float x, y;
float x, y;
uint16 s, t;
Color color;
Color color;
};
size_t getFormatStride(CommonFormat format);
@@ -101,5 +94,8 @@ void fillIndices(TriangleIndexMode mode, uint16 vertexStart, uint16 vertexCount,
void fillIndices(TriangleIndexMode mode, uint32 vertexStart, uint32 vertexCount, uint32 *indices);
} // vertex
typedef vertex::XYf_STf_RGBAub Vertex;
} // graphics
} // love