enable texture interpolation during rotating and scaling

This commit is contained in:
Konstantin Käfer
2014-02-19 15:39:44 +01:00
parent 2602774a9c
commit 9710fbef99
7 changed files with 41 additions and 12 deletions

View File

@@ -400,9 +400,10 @@ void Painter::renderPoint(PointBucket& bucket, const std::string& layer_name, co
ImagePosition imagePos = style.sprite->getPosition(sized_image, false);
useProgram(pointShader->program);
style.sprite->bind(transform.rotating || transform.scaling);
pointShader->setMatrix(matrix);
pointShader->setColor(color);
const float pointSize = ceil(properties.size);
const float pointSize = properties.size * 1.4142135623730951;
#if defined(GL_ES_VERSION_2_0)
pointShader->setSize(pointSize);
#else
@@ -410,7 +411,6 @@ void Painter::renderPoint(PointBucket& bucket, const std::string& layer_name, co
#endif
pointShader->setPointTopLeft({{ imagePos.tl.x, imagePos.tl.y }});
pointShader->setPointBottomRight({{ imagePos.br.x, imagePos.br.y }});
style.sprite->bind(true);
bucket.drawPoints(*pointShader);
}