Adjust Web3DOverlay to load QML even if not visible

This commit is contained in:
Ryan Huffman 2017-05-09 16:01:20 -07:00
parent 51db0cef98
commit bddfdfa838

View file

@ -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());