Merge lp:~mc-return/compiz/compiz.merge-fix1117311-gears-cylinders-not-rendered-correctly into lp:compiz/0.9.9

Proposed by MC Return
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3599
Merged at revision: 3599
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1117311-gears-cylinders-not-rendered-correctly
Merge into: lp:compiz/0.9.9
Diff against target: 47 lines (+15/-15)
1 file modified
plugins/gears/src/gears.cpp (+15/-15)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1117311-gears-cylinders-not-rendered-correctly
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+146853@code.launchpad.net

Commit message

Cube Gears plugin:
Fixed the rendering of the inner cylinders by rendering them first.

(LP: #1117311)

Description of the change

There is still a minor rendering problem left. I do not
recall, if the same happened with Compiz 0.9.7 versions,
but currently all gears are rendered on top of each other
and do not care, which gear is in front...
Should also be fixed sooner or later...

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/gears/src/gears.cpp'
2--- plugins/gears/src/gears.cpp 2013-02-02 23:01:02 +0000
3+++ plugins/gears/src/gears.cpp 2013-02-06 13:26:22 +0000
4@@ -48,6 +48,21 @@
5
6 da = 2.0 * M_PI / teeth / 4.0;
7
8+ glShadeModel (GL_SMOOTH);
9+
10+ /* draw inside radius cylinder */
11+ glBegin (GL_QUAD_STRIP);
12+
13+ for (i = 0; i <= teeth; i++)
14+ {
15+ angle = i * 2.0 * M_PI / teeth;
16+ glNormal3f (-cos (angle), -sin (angle), 0.0);
17+ glVertex3f (r0 * cos (angle), r0 * sin (angle), -width * 0.5);
18+ glVertex3f (r0 * cos (angle), r0 * sin (angle), width * 0.5);
19+ }
20+
21+ glEnd();
22+
23 glShadeModel (GL_FLAT);
24
25 glNormal3f (0.0, 0.0, 1.0);
26@@ -172,21 +187,6 @@
27 glVertex3f (r1 * cos (0), r1 * sin (0), -width * 0.5);
28
29 glEnd();
30-
31- glShadeModel (GL_SMOOTH);
32-
33- /* draw inside radius cylinder */
34- glBegin (GL_QUAD_STRIP);
35-
36- for (i = 0; i <= teeth; i++)
37- {
38- angle = i * 2.0 * M_PI / teeth;
39- glNormal3f (-cos (angle), -sin (angle), 0.0);
40- glVertex3f (r0 * cos (angle), r0 * sin (angle), -width * 0.5);
41- glVertex3f (r0 * cos (angle), r0 * sin (angle), width * 0.5);
42- }
43-
44- glEnd();
45 }
46
47 void

Subscribers

People subscribed via source and target branches