14 static const float PI = 3.1415926535897;
16 /// ***** Private Method Headers *****
20 /// ***** Public Methods *****
28 void graphicsCleanUp()
38 for(int n = 0; n < num; n++)
40 float angle = 2 * PI * n / num;
49 /// ***** Private Methods *****
52 if(SDL_Init(SDL_INIT_VIDEO) < 0)
54 cerr << "SDL_Init failed: " << SDL_GetError() << endl;
58 // In order to use SDL_OPENGLBLIT we have to
59 // set GL attributes first
60 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 8);
61 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
63 if(SDL_SetVideoMode(800, 600, 16, SDL_OPENGL) < 0)
65 cerr << "SDL_SetVideoMode failed: " << SDL_GetError() << endl;
72 glClearColor(0.0, 0.0, 0.0, 0.0);
74 glMatrixMode(GL_PROJECTION);
77 glOrtho(-20.0, 20.0, -15.0, 15.0, -0.01, 1.01);
79 glMatrixMode(GL_MODELVIEW);
82 glEnable(GL_DEPTH_TEST);