~ubuntu-branches/ubuntu/dapper/xscreensaver/dapper-updates

« back to all changes in this revision

Viewing changes to hacks/glx/b_draw.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-08 16:00:22 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208160022-h8vccqlwegk2mnih
Tags: 4.23-2ubuntu4
Bump the versioned xscreensaver-data -> xscreensaver Replaces to
catch the latest file overwrite and allow upgrades to go smoothly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                     glb_config.bg_colour[1],
63
63
                     glb_config.bg_colour[2],
64
64
                     glb_config.bg_colour[3]);
65
 
#if 0
 
65
 
66
66
        glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, glb_config.bubble_colour);
67
 
#else
68
 
        {
69
 
                /* 
70
 
                 * E. Lassauge - 98/06/29
71
 
                 * Yeahh, cool ! Now that I know how to have random colors I 
72
 
                 * patch this pretty beautiful mode too !!
73
 
                 */
74
 
                GLfloat     fred, fgreen, fblue;
75
 
                GLfloat     params[4];
76
 
 
77
 
                fred = ((float) (NRAND(100)) / 100.0);
78
 
                fgreen = ((float) (NRAND(100)) / 100.0);
79
 
                /* I keep more blue */
80
 
                fblue = ((float) (NRAND(50)) / 100.0) + 0.50;
81
 
 
82
 
                params[0] = fred;
83
 
                params[1] = fgreen;
84
 
                params[2] = fblue;
85
 
                /* For the moment don't play with ALPHA channel */
86
 
                params[3] = glb_config.bubble_colour[3];
87
 
                glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, params);
88
 
        }
89
 
#endif
90
67
        glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
91
68
        glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, mat_emission);
92
69
        glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
93
70
 
94
 
#if GLB_USE_BLENDING
95
 
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
96
 
#endif
 
71
        if (glb_config.transparent_p)
 
72
          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
97
73
 
98
74
        glEnable(GL_LIGHTING);
99
75
        glEnable(GL_LIGHT0);
100
76
        glEnable(GL_LIGHT1);
101
77
        glEnable(GL_LIGHT2);
102
 
#if GLB_USE_BLENDING
103
 
        glEnable(GL_BLEND);
104
 
#else
105
 
        glEnable(GL_DEPTH_TEST);
106
 
#endif
 
78
 
 
79
        if (glb_config.transparent_p)
 
80
          glEnable(GL_BLEND);
 
81
        else
 
82
          glEnable(GL_DEPTH_TEST);
 
83
 
107
84
        glEnable(GL_AUTO_NORMAL);
108
85
        glEnable(GL_NORMALIZE);
109
86
 
110
 
#if GLB_USE_BLENDING
111
 
        glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
112
 
#endif
 
87
        if (glb_config.transparent_p)
 
88
          glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
 
89
 
113
90
        glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
114
91
        glLightfv(GL_LIGHT0, GL_POSITION, light_position[0]);
115
92
        glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse[0]);