mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Prevent redundant shader uniform uploads for built-in uniforms when OpenGL ES 2 is used.
As a result, the graphics primitive drawing functions (e.g. love.graphics.rectangle) are now more efficient on mobile devices.
This commit is contained in:
@@ -180,11 +180,10 @@ public:
|
||||
* Internal use only.
|
||||
**/
|
||||
bool hasVertexAttrib(VertexAttribID attrib) const;
|
||||
bool hasBuiltinUniform(BuiltinUniform builtin) const;
|
||||
bool sendBuiltinMatrix(BuiltinUniform builtin, int size, const GLfloat *m, int count);
|
||||
bool sendBuiltinFloat(BuiltinUniform builtin, int size, const GLfloat *m, int count);
|
||||
|
||||
void checkSetScreenParams();
|
||||
void checkSetPointSize(float size);
|
||||
void checkSetBuiltinUniforms();
|
||||
|
||||
const std::map<std::string, Object *> &getBoundRetainables() const;
|
||||
|
||||
@@ -260,6 +259,9 @@ private:
|
||||
|
||||
float lastPointSize;
|
||||
|
||||
Matrix lastTransformMatrix;
|
||||
Matrix lastProjectionMatrix;
|
||||
|
||||
// Counts total number of textures bound to each texture unit in all shaders
|
||||
static std::vector<int> textureCounters;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user