Пример #1
0
ENTRYPOINT void 
init_stonerview (ModeInfo *mi)
{
  stonerview_configuration *bp;

  if (!bps) {
    bps = (stonerview_configuration *)
      calloc (MI_NUM_SCREENS(mi), sizeof (stonerview_configuration));
    if (!bps) {
      fprintf(stderr, "%s: out of memory\n", progname);
      exit(1);
    }

    bp = &bps[MI_SCREEN(mi)];
  }

  bp = &bps[MI_SCREEN(mi)];

  bp->glx_context = init_GL(mi);

  bp->trackball = gltrackball_init ();
  bp->st = init_view(MI_IS_WIREFRAME(mi));
  init_move(bp->st);

  reshape_stonerview (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
}
Пример #2
0
ENTRYPOINT void 
init_stonerview (ModeInfo *mi)
{
  stonerview_configuration *bp;

  if (!bps) {
    bps = (stonerview_configuration *)
      calloc (MI_NUM_SCREENS(mi), sizeof (stonerview_configuration));
    if (!bps) {
      fprintf(stderr, "%s: out of memory\n", progname);
      exit(1);
    }
  }

  bp = &bps[MI_SCREEN(mi)];

  bp->glx_context = init_GL(mi);

  bp->trackball = gltrackball_init ();
  bp->st = stonerview_init_view(MI_IS_WIREFRAME(mi), transparent_p);
  stonerview_init_move(bp->st);

  reshape_stonerview (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
  clear_gl_error(); /* WTF? sometimes "invalid op" from glViewport! */
}