Spin: spin a logo on each monitor
This commit is contained in:
parent
15dc4f8d75
commit
27e302f126
@ -6,22 +6,27 @@
|
||||
|
||||
bool Spin::expose (GnomeScreensaver & gs)
|
||||
{
|
||||
int n_monitors = gs.getNumMonitors();
|
||||
int width = gs.getWidth() / n_monitors;
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
for (int i = 0; i < n_monitors; i++)
|
||||
{
|
||||
glViewport(width * i, 0, width, gs.getHeight());
|
||||
|
||||
glRotatef(gs.getTicks() / 1000.0 * 360.0 / 4.0, 0, 1, 0);
|
||||
m_logobox.draw();
|
||||
glPushMatrix();
|
||||
|
||||
glPopMatrix();
|
||||
glRotatef(gs.getTicks() / 1000.0 * 360.0 / 4.0, 0, 1, 0);
|
||||
m_logobox.draw();
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Spin::configure (GnomeScreensaver & gs)
|
||||
{
|
||||
glViewport(0, 0, gs.getWidth(), gs.getHeight());
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(60.0, gs.getAspectRatio(), 0.01, 1000.0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user