static void pinit(providencestruct *mp) { glClearDepth(1.0); mp->currenttime = 0.0; init_particles(mp); make_brick(mp); build_eye(mp); /* build pyramid list */ mp->pyramidlist = glGenLists(1); glNewList(mp->pyramidlist, GL_COMPILE); draw_seal(mp); glEndList(); }
void run() { int i, j; scanf( "%d%d", &n, &m ); tm = 1<<m, tm2 = 1<<(2*m); rep(i,m) { b[i][0] = i + 2 <= m ? make_brick( 1, 1, 3, i ) : 0; b[i][1] = i - 1 >= 0 ? make_brick( 2, 2, 3, i - 1 ) : 0; b[i][2] = i + 3 <= m ? make_brick( 1, 7, 0, i ) : 0; b[i][3] = i - 2 >= 0 ? make_brick( 4, 7, 0, i - 2 ) : 0; b[i][4] = i + 2 <= m ? make_brick( 3, 1, 1, i ) : 0; b[i][5] = i + 2 <= m ? make_brick( 3, 2, 2, i ) : 0; b[i][6] = i + 3 <= m ? make_brick( 7, 1, 0, i ) : 0; b[i][7] = i + 3 <= m ? make_brick( 7, 4, 0, i ) : 0; }
static void pinit(providencestruct *mp) { glClearDepth(1.0); glClearColor(0.0, 0.0, 0.0, 1.0); /* setup twoside lighting */ glLightfv(GL_LIGHT0, GL_AMBIENT, ambient2); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); glLightfv(GL_LIGHT0, GL_POSITION, mp->position0); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); mp->currenttime = 0.0; init_particles(mp); make_brick(mp); build_eye(mp); glEnable(GL_NORMALIZE); glFrontFace(GL_CCW); /* glDisable(GL_CULL_FACE); */ glEnable(GL_CULL_FACE); glCullFace(GL_BACK); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glShadeModel(GL_SMOOTH); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); /* build pyramid list */ mp->pyramidlist = glGenLists(1); glNewList(mp->pyramidlist, GL_COMPILE); draw_seal(mp); glEndList(); }
void poc() { auto&& b = make_brick(42); (void)b; }