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:
@@ -66,6 +66,9 @@ void gammaCorrectColor(Colorf &c);
|
||||
**/
|
||||
void unGammaCorrectColor(Colorf &c);
|
||||
|
||||
Colorf gammaCorrectColor(const Colorf &c);
|
||||
Colorf unGammaCorrectColor(const Colorf &c);
|
||||
|
||||
class Graphics : public Module
|
||||
{
|
||||
public:
|
||||
@@ -236,6 +239,10 @@ public:
|
||||
int vertexCount = 0;
|
||||
Texture *texture = nullptr;
|
||||
|
||||
// FIXME: This is only needed for fonts. We should just change fonts to
|
||||
// use love.graphics Images instead of raw OpenGL textures.
|
||||
ptrdiff_t textureHandle = 0;
|
||||
|
||||
StreamDrawRequest()
|
||||
{
|
||||
// VS2013 can't initialize arrays in the above manner...
|
||||
@@ -455,6 +462,7 @@ protected:
|
||||
vertex::PrimitiveMode primitiveMode;
|
||||
vertex::CommonFormat formats[2];
|
||||
StrongRef<Texture> texture;
|
||||
ptrdiff_t textureHandle = 0;
|
||||
int vertexCount;
|
||||
int indexCount;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user