+ Env->cubes.push_back(newCube);
+ }
+
+ if ( !initDone ) {
+ glutInit( Env->argc, Env->argv );
+ glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH);
+ }
+
+ if( Env->layout[0] >= Env->layout[1] ) {
+ winsize[0] = 640;
+ winsize[1] = (640.0/Env->layout[0])*Env->layout[1];
+ }
+ else {
+ winsize[1] = 640;
+ winsize[0] = (640.0/Env->layout[1])*Env->layout[0];
+ }
+
+ Env->w = winsize[0];
+ Env->h = winsize[1];
+
+ glutInitWindowSize(winsize[0], winsize[1]);
+ glutInitWindowPosition(0,0);
+ glutCreateWindow("cubelooks");
+
+ if ( !initDone ) {
+ gDisplay = glXGetCurrentDisplay();
+ gDrawable = glXGetCurrentDrawable();
+ initDone = true;