mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user