fix build using dwss.cc for main() instead of wfobj/driver - whoops
This commit is contained in:
1 parent
55bf10c282
commit
4cfa0893f6
2 files changed
+1
-1
No files matched your search
+58
@@ -0,0 +1,58 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <sysexits.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "GnomeScreensaver.h"
|
||||
#include "modes.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static Mode *current_mode = NULL;
|
||||
|
||||
static bool expose (GnomeScreensaver & gs)
|
||||
{
|
||||
return current_mode != NULL ? current_mode->expose(gs) : true;
|
||||
}
|
||||
|
||||
static bool configure (GnomeScreensaver & gs)
|
||||
{
|
||||
return current_mode != NULL ? current_mode->configure(gs) : true;
|
||||
}
|
||||
|
||||
static bool update (GnomeScreensaver & gs)
|
||||
{
|
||||
return current_mode != NULL ? current_mode->update(gs) : true;
|
||||
}
|
||||
|
||||
static Mode *getMode(GnomeScreensaver & gs)
|
||||
{
|
||||
#if 0
|
||||
return new Starfield(gs);
|
||||
#endif
|
||||
return new Spin();
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GnomeScreensaver gs(&argc, &argv, configure, expose, update, 12);
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_LIGHT0);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
current_mode = getMode(gs);
|
||||
current_mode->configure(gs);
|
||||
|
||||
gs.mainloop();
|
||||
|
||||
delete current_mode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user