Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Some errors when using Scene3D inside Page
Forum Updated to NodeBB v4.3 + New Features

Some errors when using Scene3D inside Page

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 5 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tanshihaj
    wrote on last edited by
    #1

    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();
    }
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      Cupras
      wrote on last edited by
      #2

      I'm having the same problem right now (Qt 5.8). Do you find any solution for that?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sergei Ozerov
        wrote on last edited by Sergei Ozerov
        #3

        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.

        1 Reply Last reply
        0
        • KarwanK Offline
          KarwanK Offline
          Karwan
          wrote on last edited by
          #4

          Just add this properties to Scene3D
          multisample: false
          Yeah you can call it it's Trick :) , this will solve fps problem , and i don't know why they don't call it in the documentation .

          1 Reply Last reply
          0
          • S Offline
            S Offline
            simonma
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved