- GLfloat a = i * cell_size;
- GLfloat b = cells/2 * cell_size;
- glVertex3f (a, -b, 0); glVertex3f (a, b, 0); points++;
- glVertex3f (-b, a, 0); glVertex3f (b, a, 0); points++;
+ glPushMatrix();
+ for (k = 0; k < grids; k++)
+ {
+ glBegin (GL_LINES);
+ for (i = -cells/2; i < cells/2; i++)
+ {
+ GLfloat a = i * cell_size;
+ GLfloat b = cells/2 * cell_size;
+ glVertex3f (a, -b, 0); glVertex3f (a, b, 0); points++;
+ glVertex3f (-b, a, 0); glVertex3f (b, a, 0); points++;
+ }
+ glEnd();
+ glTranslatef (cells * cell_size, 0, 0);
+ }
+ glPopMatrix();
+ glTranslatef (0, cells * cell_size, 0);