mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 18:10:37 +02:00
Adjust Web3DOverlay to load QML even if not visible
This commit is contained in:
parent
51db0cef98
commit
bddfdfa838
1 changed files with 4 additions and 4 deletions
|
@ -225,10 +225,6 @@ void Web3DOverlay::setMaxFPS(uint8_t maxFPS) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Web3DOverlay::render(RenderArgs* args) {
|
void Web3DOverlay::render(RenderArgs* args) {
|
||||||
if (!_visible || !getParentVisible()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QOpenGLContext * currentContext = QOpenGLContext::currentContext();
|
QOpenGLContext * currentContext = QOpenGLContext::currentContext();
|
||||||
QSurface * currentSurface = currentContext->surface();
|
QSurface * currentSurface = currentContext->surface();
|
||||||
if (!_webSurface) {
|
if (!_webSurface) {
|
||||||
|
@ -282,6 +278,10 @@ void Web3DOverlay::render(RenderArgs* args) {
|
||||||
_webSurface->resize(QSize(_resolution.x, _resolution.y));
|
_webSurface->resize(QSize(_resolution.x, _resolution.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_visible || !getParentVisible()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
vec2 halfSize = getSize() / 2.0f;
|
vec2 halfSize = getSize() / 2.0f;
|
||||||
vec4 color(toGlm(getColor()), getAlpha());
|
vec4 color(toGlm(getColor()), getAlpha());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue