Hi,

in a QML file I try to initialize a property of type Buffer, but unfortunately it does not work.

There's no error but in the MyMesh Entity the vertices Buffer always has zero length.


import Qt3D.Core 2.0
import Qt3D.Render 2.0
import QtQuick 2.0
import Qt3D.Extras 2.10

Entity {
    id: root

    property Buffer vertices: Buffer { type: Buffer.VertexBuffer; data: new Float32Array([ -1., 1., 0., 1., 1., 0., -1., -1., 0., 1., -1., 0. ]) }

    MyMesh {

         id: mesh

         vertices: root.vertices

   }

}

How is the correct way?


Cheers, Volker

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to