mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +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:
@@ -854,8 +854,6 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
|
||||
|
||||
OpenGL::TempDebugGroup debuggroup("ParticleSystem draw");
|
||||
|
||||
Color curcolor = gl.getColor();
|
||||
|
||||
static Matrix t;
|
||||
t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
|
||||
|
||||
@@ -916,7 +914,7 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
|
||||
glDisableVertexAttribArray(ATTRIB_POS);
|
||||
glDisableVertexAttribArray(ATTRIB_COLOR);
|
||||
|
||||
gl.setColor(curcolor);
|
||||
glVertexAttrib4f(ATTRIB_COLOR, 1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
void ParticleSystem::update(float dt)
|
||||
|
||||
Reference in New Issue
Block a user