13 vector< pair<int,culooks::window*> > culooks::Windows;
14 pthread_t culooks::glThreadId;
16 int culooks::windowid = 0;
20 culooks::culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv)
22 window *Win = new window;
27 glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH);
30 Win->layout[0] = xcubes;
31 Win->layout[1] = ycubes;
32 Win->aspect = (double)xcubes/ycubes;
33 for (int icube=0; icube<xcubes*ycubes; icube++) {
35 Win->cubes.push_back(newCube);
38 if( Win->layout[0] >= Win->layout[1] ) {
40 winsize[1] = (640.0/Win->layout[0])*Win->layout[1];
44 winsize[0] = (640.0/Win->layout[1])*Win->layout[0];
52 Win->initialized = false;
54 Windows.push_back( pair<int,culooks::window*>(0, Win) );
57 glXMakeCurrent(0,0,0);
58 pthread_create(&glThreadId, 0, &drawing::glutThread, NULL);