mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 19:34:02 +02:00
addressing review comments
This commit is contained in:
parent
30bf800963
commit
19cd537e65
3 changed files with 5 additions and 3 deletions
|
@ -271,11 +271,12 @@ void Base3DOverlay::update(float duration) {
|
|||
// TODO: Fix the value to be computed in main thread now and passed by value to the render item.
|
||||
// This is the simplest fix for the web overlay of the tablet for now
|
||||
if (_renderTransformDirty) {
|
||||
_renderTransformDirty = false;
|
||||
auto itemID = getRenderItemID();
|
||||
if (render::Item::isValidID(itemID)) {
|
||||
render::ScenePointer scene = qApp->getMain3DScene();
|
||||
render::Transaction transaction;
|
||||
transaction.updateItem<Overlay>(itemID, [](Overlay& data) {
|
||||
transaction.updateItem<Overlay>(itemID, [](Overlay& data) {
|
||||
auto overlay3D = dynamic_cast<Base3DOverlay*>(&data);
|
||||
if (overlay3D) {
|
||||
auto latestTransform = overlay3D->evalRenderTransform();
|
||||
|
@ -284,7 +285,6 @@ void Base3DOverlay::update(float duration) {
|
|||
});
|
||||
scene->enqueueTransaction(transaction);
|
||||
}
|
||||
_renderTransformDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ void Web3DOverlay::update(float deltatime) {
|
|||
// update globalPosition
|
||||
_webSurface->getSurfaceContext()->setContextProperty("globalPosition", vec3toVariant(getPosition()));
|
||||
}
|
||||
Billboard3DOverlay::update(deltatime);
|
||||
Parent::update(deltatime);
|
||||
}
|
||||
|
||||
QString Web3DOverlay::pickURL() {
|
||||
|
|
|
@ -21,6 +21,8 @@ class Web3DOverlay : public Billboard3DOverlay {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using Parent = Billboard3DOverlay;
|
||||
|
||||
static const QString QML;
|
||||
static QString const TYPE;
|
||||
virtual QString getType() const override { return TYPE; }
|
||||
|
|
Loading…
Reference in a new issue