Don't updateSizeAndPosition on setPos as it might change texture and that isn't threadsafe
This commit is contained in:
parent
670d5b7c1b
commit
bd8a841e6f
@ -42,7 +42,7 @@ void RenderObject::setPos( const std::pair< double, double > &pos ) {
|
||||
}
|
||||
void RenderObject::setPos( const Vec2D< double > &vec ) {
|
||||
original = vec;
|
||||
updateSizeAndPosition();
|
||||
// updateSizeAndPosition();
|
||||
}
|
||||
Vec2D< double > RenderObject::getPos() const {
|
||||
return original;
|
||||
|
@ -85,6 +85,7 @@ void TextRenderer::updateTexture() {
|
||||
}
|
||||
void TextRenderer::updateSizeAndPosition() {
|
||||
RectangleRender::updateSizeAndPosition();
|
||||
// TODO only if size actually changed
|
||||
updateTexture();
|
||||
updateDstRect();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user