9 vector< pair<int,culooks::window*> > culooks::Windows;
10 pthread_t culooks::glThreadId;
12 int culooks::windowid = 0;
16 culooks::culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv)
18 window *Win = new window;
23 glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH);
26 Win->layout[0] = xcubes;
27 Win->layout[1] = ycubes;
28 Win->aspect = (double)xcubes/ycubes;
29 for (int icube=0; icube<xcubes*ycubes; icube++) {
31 Win->cubes.push_back(newCube);
34 if( Win->layout[0] >= Win->layout[1] ) {
36 winsize[1] = (640.0/Win->layout[0])*Win->layout[1];
40 winsize[0] = (640.0/Win->layout[1])*Win->layout[0];
48 Win->initialized = false;
50 Windows.push_back( pair<int,culooks::window*>(0, Win) );
53 glXMakeCurrent(0,0,0);
54 pthread_create(&glThreadId, 0, &drawing::glutThread, NULL);