Mercurial > love-experiments
diff src/modules/graphics/opengl/ParticleSystem.cpp @ 1443:e952fc68069d
Ensure the current color is set properly after drawing particlesystems and spritebatches
| author | Alex Szpakowski <slime73@gmail.com> |
|---|---|
| date | Fri, 12 Apr 2013 15:40:53 -0300 |
| parents | 107d80a59bca |
| children | 923a594c28d1 |
line wrap: on
line diff
--- a/src/modules/graphics/opengl/ParticleSystem.cpp Fri Apr 12 15:24:21 2013 -0300 +++ b/src/modules/graphics/opengl/ParticleSystem.cpp Fri Apr 12 15:40:53 2013 -0300 @@ -514,8 +514,9 @@ int numParticles = count(); if (numParticles == 0) return; // don't bother if there's nothing to do + Color curcolor = opengl::getCurrentColor(); + glPushMatrix(); - glPushAttrib(GL_CURRENT_BIT); static Matrix t; t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky); @@ -576,8 +577,9 @@ glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_COLOR_ARRAY); - glPopAttrib(); glPopMatrix(); + + opengl::setCurrentColor(curcolor); } void ParticleSystem::update(float dt)
