Spin mode: every other monitor spins in other direction
This commit is contained in:
parent
6cd00909e0
commit
5a86af6aac
@ -10,13 +10,14 @@ bool Spin::expose (GnomeScreensaver & gs)
|
|||||||
int width = gs.getWidth() / n_monitors;
|
int width = gs.getWidth() / n_monitors;
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
for (int i = 0; i < n_monitors; i++)
|
for (int monitor_num = 0; monitor_num < n_monitors; monitor_num++)
|
||||||
{
|
{
|
||||||
glViewport(width * i, 0, width, gs.getHeight());
|
glViewport(width * monitor_num, 0, width, gs.getHeight());
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
glRotatef(gs.getTicks() / 1000.0 * 360.0 / 4.0, 0, 1, 0);
|
glRotatef(gs.getTicks() / 1000.0 * 360.0 / 4.0
|
||||||
|
* (monitor_num & 0x1 ? -1.0 : 1.0), 0, 1, 0);
|
||||||
m_logobox.draw();
|
m_logobox.draw();
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user