Exemple #1
0
ENTRYPOINT void
draw_noof (ModeInfo *mi)
{
  int i;
  noof_configuration *bp = &bps[MI_SCREEN(mi)];

  if (!bp->glx_context)
    return;
  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));

  /**
  if((random() & 0xff) == 0x34){
    glClear(GL_COLOR_BUFFER_BIT);
  }

  if((tko & 0x1f) == 0x1f){
    glEnable(GL_BLEND);
    glColor4f(0.0, 0.0, 0.0, 0.09);
    glRectf(0.0, 0.0, wd, ht);
    glDisable(GL_BLEND);
#ifdef __sgi
    sginap(0);
#endif
  }
  */

  gravity(bp, -2.0);
  for (i = 0; i < N_SHAPES; i++) {
    motionUpdate(bp, i);
    colorUpdate(bp, i);
    drawleaf(bp, i);
  }

  if (mi->fps_p) do_fps (mi);
  glFinish();

/* For some reason this hack screws up on Cocoa if we try to double-buffer it.
   It looks fine single-buffered, so let's just do that. */
/*  glXSwapBuffers(MI_DISPLAY(mi), MI_WINDOW(mi)); */
}
Exemple #2
0
ENTRYPOINT void
draw_noof (ModeInfo *mi)
{
    int i;
    noof_configuration *bp = &bps[MI_SCREEN(mi)];

    if (!bp->glx_context)
        return;
    glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
    mi->polygon_count = 0;

    /**
    if((random() & 0xff) == 0x34){
      glClear(GL_COLOR_BUFFER_BIT);
    }

    if((tko & 0x1f) == 0x1f){
      glEnable(GL_BLEND);
      glColor4f(0.0, 0.0, 0.0, 0.09);
      glRectf(0.0, 0.0, wd, ht);
      glDisable(GL_BLEND);
    #ifdef __sgi
      sginap(0);
    #endif
    }
    */

    gravity(bp, -2.0);
    for (i = 0; i < N_SHAPES; i++) {
        motionUpdate(bp, i);
        colorUpdate(bp, i);
        mi->polygon_count += drawleaf(bp, i);
    }

    if (mi->fps_p) do_fps (mi);
    glFinish();

    if (dbuf_p)
        glXSwapBuffers(MI_DISPLAY(mi), MI_WINDOW(mi));
}
Exemple #3
0
void
oneFrame(void)
{
  int i;

  /**
  if((random() & 0xff) == 0x34){
    glClear(GL_COLOR_BUFFER_BIT);
  }

  if((tko & 0x1f) == 0x1f){
    glEnable(GL_BLEND);
    glColor4f(0.0, 0.0, 0.0, 0.09);
    glRectf(0.0, 0.0, wd, ht);
    glDisable(GL_BLEND);
#ifdef __sgi
    sginap(0);
#endif
  }
  */
  gravity(-2.0);
  for (i = 0; i < N_SHAPES; i++) {
    motionUpdate(i);
#ifdef __sgi
    sginap(0);
#endif
    colorUpdate(i);
#ifdef __sgi
    sginap(0);
#endif
    drawleaf(i);
#ifdef __sgi
    sginap(0);
#endif

  }
  glFlush();
}