Improve performance of Shader:send when the Shader is not active.

It now defers uploading the uniforms to the program object until the shader becomes active again, instead of activating the shader program and deactivating it each time Shader:send is called.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-12-28 16:24:57 -04:00
parent a78fa39113
commit 80f269d252
2 changed files with 33 additions and 21 deletions
+2
View File
@@ -243,6 +243,8 @@ private:
// Texture unit pool for setting images
std::vector<TextureUnit> textureUnits;
std::vector<std::pair<const UniformInfo *, int>> pendingUniformUpdates;
bool canvasWasActive;
Rect lastViewport;