Some errors when using Scene3D inside Page
-
When I'm using Scene3D inside ApplicationWindow or Item everything is ok, but when I'm trying to insert Scene3D into Page:
import QtQuick 2.4 import QtQuick.Controls 2.0 import QtQuick.Scene3D 2.0 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 import Qt3D.Extras 2.0 ApplicationWindow { visible: true Page { id: page title: "Page#1" Scene3D { id: mapScene anchors.fill: parent Entity { id: sceneRoot Camera { id: camera } components: [ RenderSettings { activeFrameGraph: ForwardRenderer { clearColor: Qt.rgba( 1.0, 1.0, 1.0, 1.0 ) camera: camera } } ] InputSettings { } } } } }
Some errors are appears:
QML debugging is enabled. Only use this in a safe environment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObjectPrivate::checkFramebufferStatus: QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
It seems this errors doesn't lead to problems or crash. Why do this errors appear?
main.cpp:
#include <QtGui/QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include <QtQml> int main(int argc, char* argv[]) { qSetMessagePattern( "%{function}: %{message}" ); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl("qrc:/main.qml")); return app.exec(); }
-
Same problem with Qt 5.12. Also produces huge flickering on all pages except for page with Scene3D.
UPD: in my case it seems that the problem was not in Page component, but rather in a StackView that used Pages. Page with Scene3D embedded directly in ApplicationWindow worked just fine. -
I experience the same problem with a Scene3D in a StackLayout. If I set anchors.fill = parent, the flickering and the warnings are gone, but I get a new warning:
"QML Scene3D: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead."But using
Layout.fillWidth: true
Layout.fillHeight: true
instead doesn't fix the problem.Adding
multisample: false
didn't work