diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-20 15:37:39 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-20 15:37:39 (GMT) |
commit | e93ffdbb6fde611defc34fd27aec25c40da5a60e (patch) | |
tree | e02d3f92596bb72e355a47e37dc19113320e775c /examples/opengl/samplebuffers | |
parent | 851a858fcd28c35dff2ffbeffdb40f7ee69f45b4 (diff) | |
download | Qt-e93ffdbb6fde611defc34fd27aec25c40da5a60e.zip Qt-e93ffdbb6fde611defc34fd27aec25c40da5a60e.tar.gz Qt-e93ffdbb6fde611defc34fd27aec25c40da5a60e.tar.bz2 |
Fix opengl examples after bad merge.
Not sure when it happened, but these files were changed as a result of
a merge conflict and at this point there should be no difference in
these examples between the Qt/S60 and Qt master branches.
Diffstat (limited to 'examples/opengl/samplebuffers')
-rw-r--r-- | examples/opengl/samplebuffers/glwidget.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/examples/opengl/samplebuffers/glwidget.cpp b/examples/opengl/samplebuffers/glwidget.cpp index 95651b3..9a41f51 100644 --- a/examples/opengl/samplebuffers/glwidget.cpp +++ b/examples/opengl/samplebuffers/glwidget.cpp @@ -109,28 +109,37 @@ void GLWidget::makeObject() QColor qtGreen(QColor::fromCmykF(0.40, 0.0, 1.0, 0.0)); const double Pi = 3.14159265358979323846; const int NumSectors = 15; + GLdouble x1 = +0.06; + GLdouble y1 = -0.14; + GLdouble x2 = +0.14; + GLdouble y2 = -0.06; + GLdouble x3 = +0.08; + GLdouble y3 = +0.00; + GLdouble x4 = +0.30; + GLdouble y4 = +0.22; list = glGenLists(1); glNewList(list, GL_COMPILE); { for (int i = 0; i < NumSectors; ++i) { double angle1 = (i * 2 * Pi) / NumSectors; - GLdouble x1 = 0.30 * sin(angle1); - GLdouble y1 = 0.30 * cos(angle1); - GLdouble x2 = 0.20 * sin(angle1); - GLdouble y2 = 0.20 * cos(angle1); + GLdouble x5 = 0.30 * sin(angle1); + GLdouble y5 = 0.30 * cos(angle1); + GLdouble x6 = 0.20 * sin(angle1); + GLdouble y6 = 0.20 * cos(angle1); double angle2 = ((i + 1) * 2 * Pi) / NumSectors; - GLdouble x3 = 0.20 * sin(angle2); - GLdouble y3 = 0.20 * cos(angle2); - GLdouble x4 = 0.30 * sin(angle2); - GLdouble y4 = 0.30 * cos(angle2); + GLdouble x7 = 0.20 * sin(angle2); + GLdouble y7 = 0.20 * cos(angle2); + GLdouble x8 = 0.30 * sin(angle2); + GLdouble y8 = 0.30 * cos(angle2); qglColor(qtGreen); - quad(GL_QUADS, x1, y1, x2, y2, x3, y3, x4, y4); + quad(GL_QUADS, x5, y5, x6, y6, x7, y7, x8, y8); qglColor(Qt::black); - quad(GL_LINE_LOOP, x1, y1, x2, y2, x3, y3, x4, y4); + quad(GL_LINE_LOOP, x5, y5, x6, y6, x7, y7, x8, y8); } + qglColor(qtGreen); quad(GL_QUADS, x1, y1, x2, y2, y2, x2, y1, x1); quad(GL_QUADS, x3, y3, x4, y4, y4, x4, y3, x3); |