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. My recent Qt3D/QML question collection
QtWS25 Last Chance

My recent Qt3D/QML question collection

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 845 Views
  • 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.
  • M Offline
    M Offline
    Midori Yakumo
    wrote on 8 Jul 2016, 08:57 last edited by
    #1

    I am learning OpenGL with http://learnopengl.com/ as well as Qt3D, the documnet of Qt3D is far from complete (especially the QML part), so I feel quite puzzled

    1. https://github.com/MidoriYakumo/learnopengl-qt3d/blob/master/qml/hellotriangle.qml vs http://learnopengl.com/code_viewer.php?code=getting-started/hellotriangle
      Why render by default do face culling with normal array though there is no normal set in my code , without
    renderStates: CullFace { mode: CullFace.NoCulling }
    

    a reversed-ordered triangle vertices will not be drawn on screen.

    1. The same example hellotriangle in https://github.com/MidoriYakumo/learnopengl-qt3d/blob/master/qml/Components/RenderSettings0.qml
    	activeFrameGraph: ClearBuffers {
    		buffers: ClearBuffers.ColorDepthBuffer // Why not ColorBuffer only???
    		clearColor: Qt.rgba(0.2, 0.3, 0.3, 1.0)
    		RenderSurfaceSelector {
    		}
    	}
    

    vs

         glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
         glClear(GL_COLOR_BUFFER_BIT);
    

    The triangle do not have z-depth information, however Qt3D will not draw any thing with buffers:ClearBuffers.ColorBuffer, why?

    1. Will TextureImage and other resource type support resources from url scheme of http in the future? <= An example of lack of unity of QtQuick and Qt3D

    2. https://github.com/MidoriYakumo/learnopengl-qt3d/blob/master/qml/transformations.qml vs http://learnopengl.com/code_viewer.php?code=getting-started/transformations-exercise2
      We can call glDrawElements twice for different parameters as two render pass, can I somehow assemble with Transform for first render pass and switch to another in the second pass?

    3. https://github.com/MidoriYakumo/learnopengl-qt3d/blob/master/qml/coordinate_systems_multiple_objects.qml
      Old question, any good way to assmble Entities in scene dynamically?
      I have tried:
      a. ListElements of Entites

    property list<Box0> boxes:[ Box0{ }, Box0{ }, Box0{ } ]
    

    almost read-only, seems data cannot be binded in run-time
    b. QtQuick.Repeater

    QQ2.Repeater {
    	id: repeater
    	model: root.cubePositions
    	delegate: Box0 {
    		transform: Transform {
    			translation: data
    		}
    	}
    }
    

    It doesn't work because that an Item is not an Entity [#QTBUG-27444]
    c. QtQuick.OnCompleted + createComponent + createQmlObject (for binding)

    QQ2.Component.onCompleted: {
    	var component = Qt.createComponent("Components/Box0.qml")
    	for (var i in cubePositions) {
    		var box = component.createObject(root)
    		var transform = Qt.createQmlObject("import Qt3D.Core 2.0;
    			Transform {
    				rotation: fromAxisAndAngle(Qt.vector3d(1, .3, 5), root.angle*%1)
    			}".arg(i), box); // Dirty binding and namespace
    		transform.translation = cubePositions[i]
    		box.transform = transform
    	}
    }
    

    It just works but I feel dirty
    6. There is something interesting in above that I have to use createQmlObject, because

    box.transform.rotation = Transform.fromAxisAndAngle(Qt.vector3d(1, .3, 5), root.angle) 
    

    will not work, is there any workaround/trick for QtQuick method namespace restriction?

    Thanks for your discussion!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Jul 2016, 21:13 last edited by
      #2

      Hi,

      Not a direct answer, Qt3D in it's current version is a tech preview thus the documentation is also a work in progress that will be improved.

      For your current questions, you should bring them to the interest mailing list. You'll find there Qt3D's developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 10 Jul 2016, 14:40
      0
      • S SGaist
        8 Jul 2016, 21:13

        Hi,

        Not a direct answer, Qt3D in it's current version is a tech preview thus the documentation is also a work in progress that will be improved.

        For your current questions, you should bring them to the interest mailing list. You'll find there Qt3D's developers/maintainers. This forum is more user oriented.

        M Offline
        M Offline
        Midori Yakumo
        wrote on 10 Jul 2016, 14:40 last edited by
        #3

        @SGaist thank you dude!

        1 Reply Last reply
        0

        1/3

        8 Jul 2016, 08:57

        • Login

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