mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Improved performance slightly when love.graphics.setColor is used heavily with automatic batching.
--HG-- branch : minor
This commit is contained in:
@@ -1232,9 +1232,7 @@ void Graphics::setColor(Colorf c)
|
||||
c.b = std::min(std::max(c.b, 0.0f), 1.0f);
|
||||
c.a = std::min(std::max(c.a, 0.0f), 1.0f);
|
||||
|
||||
Colorf nc = c;
|
||||
gammaCorrectColor(nc);
|
||||
gl.setConstantColor(nc);
|
||||
gl.setConstantColor(c);
|
||||
|
||||
states.back().color = c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user