Abstracted lower level drawing code, moved all type-specific drawing code out of opengl backend, deleted obsolete files

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-10-26 20:58:19 -03:00
parent 7ffb04f019
commit e3fd489373
22 changed files with 109 additions and 630 deletions
+8 -1
View File
@@ -167,6 +167,11 @@ ParticleSystem::~ParticleSystem()
deleteBuffers();
}
ParticleSystem *ParticleSystem::clone()
{
return new ParticleSystem(*this);
}
void ParticleSystem::resetOffset()
{
if (quads.empty())
@@ -1095,7 +1100,9 @@ void ParticleSystem::draw(Graphics *gfx, const Matrix4 &m)
vertexbuffers.set(0, buffer, 0);
Graphics::TempTransform transform(gfx, m);
drawInternal(vertexAttributes, vertexbuffers);
int count = quadIndices.getIndexCount(getCount());
gfx->drawIndexed(PRIMITIVE_TRIANGLES, count, 1, quadIndices.getType(), quadIndices.getBuffer(), 0, vertexAttributes, vertexbuffers, texture);
}
bool ParticleSystem::getConstant(const char *in, AreaSpreadDistribution &out)