Beispiel #1
0
void
display(void)
{
    int i;

    glClear(GL_COLOR_BUFFER_BIT);
    for (i = 0; i < numSplats; i++) {
        renderSplat(&splatList[i]);
    }
}
Beispiel #2
0
void
mouse(int button, int state, int x, int y)
{
  if (button == GLUT_LEFT_BUTTON) {
    if (state == GLUT_DOWN) {
      if (numSplats < MAX_SPLATS) {
        splatConfig.x = x;
        splatConfig.y = winHeight - y;
	renderSplat(&splatConfig);
        splatList[numSplats] = splatConfig;
        numSplats++;
      } else {
        printf("out of splats!\n");
      }
    }
  }
}