Qt3D Cube, No surface texture but with edges, how to?



  • Hi, all:

    I'm trying to create a cube shape, without any texture on the surfaces, but it should still be able to show the edges. I tried:

    @QGLSceneNode *cube = builder.finalizedSceneNode();
    QGLMaterial *mat = new QGLMaterial;
    mat->setColor( Qt::transparent);
    cube->setMaterial(mat);@

    Nothing can be shown up.

    If I try
    @QGLSceneNode *cube = builder.finalizedSceneNode();
    QGLMaterial *mat = new QGLMaterial;
    mat->setColor(QColor(255, 0, 0));
    cube->setMaterial(mat);@

    This will show up a cube with texture on all surfaces.

    Is there a method to show just the edges (maybe I can specify the edge width, or even emphasize the vertexes), but not the surfaces?

    Cheers
    Pei


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.