diff --git a/LogoBox.cc b/LogoBox.cc index 872cb81..6c0b79d 100644 --- a/LogoBox.cc +++ b/LogoBox.cc @@ -52,6 +52,10 @@ LogoBox::LogoBox() glPopMatrix(); glEndList(); } + else + { + cerr << "Error loading dwlogo.obj" << endl; + } } m_drawList = _drawList; m_width = _width; diff --git a/dwss.cc b/dwss.cc index f9ffc19..6910915 100644 --- a/dwss.cc +++ b/dwss.cc @@ -49,5 +49,8 @@ int main (int argc, char *argv[]) GnomeScreensaver gs(&argc, &argv, configure, expose, update, 12); gs.mainloop(); + for (int i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) + delete modes[i]; + return 0; } diff --git a/modes/Spin.cc b/modes/Spin.cc index 700b642..bc3c960 100644 --- a/modes/Spin.cc +++ b/modes/Spin.cc @@ -7,9 +7,21 @@ bool Spin::expose (GnomeScreensaver & gs) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glPushMatrix(); + glTranslatef(0, 0, -3.0); + glRotatef(gs.getTicks() / 1000.0 * 360.0 / 4.0, 0, 1, 0); m_logobox.draw(); + + glBegin(GL_QUADS); + glColor3f(1, 0.6, 0); + glNormal3f(0, 0, 1); + glVertex2f(1, 1); + glVertex2f(-1, 1); + glVertex2f(-1, -1); + glVertex2f(1, 0); + glEnd(); glPopMatrix(); return true; @@ -25,7 +37,11 @@ bool Spin::configure (GnomeScreensaver & gs, int width, int height) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - gluLookAt(0, 0, 0, 0, 0, 4, 0, 1, 0); +// gluLookAt(0, 0, 0, 0, 0, 4, 0, 1, 0); + + glShadeModel(GL_SMOOTH); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); return true; }