Hi,

I've been advised to ask this here because you guys are more familiar with 
Qt3D, so here goes:

I'm having trouble rendering multiple pieces of geometry with QGLBuilder. I 
have a RenderBox test class which has an origin, min and max vector, and a 
toGeomData() function which returns its current state (vertices, normals, 
colours) as a QGeometryData object. My rendering loop in a given test is as 
follows:
        * Create the QGLBuilder.

        * Export the QGeometryData (geom below) from the RenderBox, which is 
centred at 0,0,0.

        * Change the RenderBox to be centred at 2,2,2.

        * Export the QGeometryData again, to a different object (geom2 below).

        * Reset the RenderBox to be back at 0,0,0.

        * Add both QGeometryData objects to the QGLBuilder: geom followed by 
geom2.

        * Get the finalised scene node and draw it.
The problem I'm having is that only the box centred at 0,0,0 is drawn. If I add 
only the box at 2,2,2 then it's rendered where it should be, but otherwise it 
appears to be completely ignored.

I've tried the following methods, all of which have the same problem:
builder<<geom;
builder<<geom2;

builder.newNode();

builder.addTriangles(geom);

builder.newNode();

builder.addTriangles(geom2);

builder.newNode();

builder.addTriangles(geom);

builder.pushNode();

builder.addTriangles(geom2);
Could anyone explain what might be going wrong?

Thanks.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to