float x = particle.getPosition().x - width / 2;
float y = particle.getPosition().y - height / 2;
Color4f color = particle.getColor();
// TODO test in joglgraphicsdelegate if texturecoordinates are available
Triangle t = pool[triangles];
t.getPoint(0).set(x, y);
t.getPoint(1).set(x + width, y);
t.getPoint(2).set(x, y + height);
t.getTextureCoordinate(0).set(0, 0);
t.getTextureCoordinate(1).set(imageWidth, 0);
t.getTextureCoordinate(2).set(0, imageHeight);
t.getColor(0).set(color);
t.getColor(1).set(color);
t.getColor(2).set(color);
temp[triangles] = t;
triangles++;
t = pool[triangles];
t.getPoint(0).set(x + width, y);
t.getPoint(1).set(x + width, y + width);
t.getPoint(2).set(x, y + height);
t.getTextureCoordinate(0).set(imageWidth, 0);
t.getTextureCoordinate(1).set(imageWidth, imageHeight);
t.getTextureCoordinate(2).set(0, imageHeight);
t.getColor(0).set(color);
t.getColor(1).set(color);
t.getColor(2).set(color);
temp[triangles] = t;
triangles++;
if(triangles == numTriangles) {
graphics.fillTriangles(temp, true, image);