コード例 #1
0
ファイル: providence.c プロジェクト: MaddTheSane/xscreensaver
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();
}
コード例 #2
0
ファイル: providence.c プロジェクト: RazZziel/pongclock
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();
}