00001 #include "Program.h"
00002 #include <GL/glut.h>
00003
00004 using namespace std;
00005
00006 GLUI* glui;
00007 Program* program;
00008
00009 static void HandleDisplay () { program->HandleDisplay(); }
00010 static void HandleReshape (int w, int h) { program->HandleReshape(w, h); }
00011 static void HandleKeyboard (unsigned char key, int x, int y) { program->HandleKeyboard(key, x, y); }
00012 static void HandleSpecialKey(int key, int x, int y) { program->HandleSpecialKey(key, x, y); }
00013 static void HandleMouse(int button, int state, int x, int y) { program->HandleMouse(button, state, x, y); }
00014 static void HandleMouseMotion(int x, int y) { program->HandleMouseMotion(x, y); }
00015 static void HandleIdle (void) { program->HandleIdle(); }
00016
00017 int main(int argc, char* argv[])
00018 {
00019 glutInit (&argc, argv);
00020 glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
00021 glutInitWindowSize (640, 480);
00022 glutInitWindowPosition (0,0);
00023
00024 int winId = glutCreateWindow("Complex Logarithmic Mapping");
00025
00026 program = new Program(winId);
00027 glui = GLUI_Master.create_glui("GLUI");
00028 program->InitGlui(glui);
00029
00030
00031
00032 glutDisplayFunc (HandleDisplay);
00033 glutKeyboardFunc (HandleKeyboard);
00034 glutMouseFunc (HandleMouse);
00035 glutMotionFunc (HandleMouseMotion);
00036 glutSpecialFunc (HandleSpecialKey);
00037 glutReshapeFunc (HandleReshape);
00038
00039
00040 GLUI_Master.set_glutIdleFunc(HandleIdle);
00041
00042
00043 glutMainLoop ();
00044
00045 return 0;
00046 }
00047
00048