mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
love.graphics.setColor no longer uses the main per-vertex color attribute. This lets it affect the color of ParticleSystems, and SpriteBatches and Meshes even when they use custom per-vertex colors.
This commit is contained in:
@@ -236,8 +236,6 @@ void SpriteBatch::draw(float x, float y, float angle, float sx, float sy, float
|
||||
array_buf->unmap(buffer_used_offset, buffer_used_size);
|
||||
buffer_used_offset = buffer_used_size = 0;
|
||||
|
||||
Color curcolor = gl.getColor();
|
||||
|
||||
// Apply per-sprite color, if a color is set.
|
||||
if (color)
|
||||
{
|
||||
@@ -260,7 +258,7 @@ void SpriteBatch::draw(float x, float y, float angle, float sx, float sy, float
|
||||
if (color)
|
||||
{
|
||||
glDisableVertexAttribArray(ATTRIB_COLOR);
|
||||
gl.setColor(curcolor);
|
||||
glVertexAttrib4f(ATTRIB_COLOR, 1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user