H[2] = ((H[1] + shift) < 360) ? (H[1]+shift) : (H[1] + shift - 360);
S[0] = S[1] = S[2] = 1.0;
V[0] = V[1] = V[2] = 1.0;
- make_color_loop(0, 0,
+ make_color_loop(0, 0, 0,
H[0], S[0], V[0],
H[1], S[1], V[1],
H[2], S[2], V[2],
(y - 0.5) * 6,
(z - 0.5) * 15);
+ /* Do it twice because we don't track the device's orientation. */
+ glRotatef( current_device_rotation(), 0, 0, 1);
gltrackball_rotate (cc->trackball);
+ glRotatef(-current_device_rotation(), 0, 0, 1);
get_rotation (cc->rot, &x, &y, &z, !cc->button_down_p);
glRotatef (x * 360, 1.0, 0.0, 0.0);