diff options
Diffstat (limited to 'src/mmscene.cpp')
| -rw-r--r-- | src/mmscene.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/mmscene.cpp b/src/mmscene.cpp index bf6dc1f..784a1d4 100644 --- a/src/mmscene.cpp +++ b/src/mmscene.cpp @@ -33,27 +33,7 @@ void MMScene::paintOnTopOfQmlScene() void MMScene::setupGeometry() { - //Now we create the geometry. Every corner needs a vertex, a normal, a color and a texture, - //although normal and texture are not used for basic rendering. - QVector3D v00 = QVector3D(0.0, 0.0, 0.0); - QVector3D v01 = QVector3D(1.0, 0.0, 0.0); - QVector3D v02 = QVector3D(0.0, 1.0, 0.0); - QVector3D n0 = QVector3D(0.0, 0.0, 1.0); //dummy normal - QVector3D t0 = QVector3D(0.0,0.0,0.0); //dummy texture - - //append the vertices for the triangle - m_points.append(GLPoint(v00, n0, t0, GLColorRgba::clRed)); - m_points.append(GLPoint(v01, n0, t0, GLColorRgba::clGreen)); - m_points.append(GLPoint(v02, n0, t0, GLColorRgba::clBlue)); - - QVector3D v10 = QVector3D(1.0, 1.0, 0.0); - QVector3D v11 = QVector3D(1.0, 0.0, 0.0); - QVector3D v12 = QVector3D(0.0, 1.0, 0.0); - - //append the vertices for the triangle - m_points.append(GLPoint(v10, n0, t0, GLColorRgba::clRed)); - m_points.append(GLPoint(v11, n0, t0, GLColorRgba::clGreen)); - m_points.append(GLPoint(v12, n0, t0, GLColorRgba::clBlue)); + createCube(QVector3D(0.0, 0.0, 0.0), QVector3D(1.0, 1.0, 1.0)); m_colorArrayEnabled = true; |
