Esempio n. 1
0
void TextEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) {
    _textColor = toGlm(entity->getTextColor());
    _backgroundColor = toGlm(entity->getBackgroundColor());
    _faceCamera = entity->getFaceCamera();
    _lineHeight = entity->getLineHeight();
    _text = entity->getText();
}
Esempio n. 2
0
bool TextEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const {
    if (_text != entity->getText()) {
        return true;
    }

    if (_lineHeight != entity->getLineHeight()) {
        return true;
    }

    if (_textColor != toGlm(entity->getTextColor())) {
        return true;
    }

    if (_backgroundColor != toGlm(entity->getBackgroundColor())) {
        return true;
    }

    if (_dimensions != entity->getScaledDimensions()) {
        return true;
    }

    if (_faceCamera != entity->getFaceCamera()) {
        return true;
    }
    return false;
}