mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fixed love.graphics.draw(particlesystem, …) to actually use the transformation parameters.
--HG-- branch : minor
This commit is contained in:
@@ -1048,7 +1048,7 @@ void ParticleSystem::update(float dt)
|
||||
prevPosition = position;
|
||||
}
|
||||
|
||||
bool ParticleSystem::prepareDraw(Graphics *gfx, const Matrix4 &m)
|
||||
bool ParticleSystem::prepareDraw(Graphics *gfx)
|
||||
{
|
||||
uint32 pCount = getCount();
|
||||
|
||||
@@ -1057,8 +1057,6 @@ bool ParticleSystem::prepareDraw(Graphics *gfx, const Matrix4 &m)
|
||||
|
||||
gfx->flushStreamDraws();
|
||||
|
||||
Graphics::TempTransform transform(gfx, m);
|
||||
|
||||
const vertex::XYf_STf *textureVerts = texture->getQuad()->getVertices();
|
||||
Vertex *pVerts = (Vertex *) buffer->map();
|
||||
Particle *p = pHead;
|
||||
|
||||
@@ -612,7 +612,7 @@ protected:
|
||||
int quadIndex;
|
||||
};
|
||||
|
||||
bool prepareDraw(Graphics *gfx, const Matrix4 &m);
|
||||
bool prepareDraw(Graphics *gfx);
|
||||
|
||||
// Pointer to the beginning of the allocated memory.
|
||||
Particle *pMem;
|
||||
|
||||
@@ -54,9 +54,11 @@ void ParticleSystem::draw(Graphics *gfx, const Matrix4 &m)
|
||||
{
|
||||
using namespace vertex;
|
||||
|
||||
if (!prepareDraw(gfx, m))
|
||||
if (!prepareDraw(gfx))
|
||||
return;
|
||||
|
||||
Graphics::TempTransform transform(gfx, m);
|
||||
|
||||
if (Shader::current && texture.get())
|
||||
Shader::current->checkMainTexture(texture);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user