iOS/buildlibs/armv7/allegro-4.4.2/addons/allegrogl/examp/excamera.c
/* Draw the (simple) world 
 * Notice how the camera doesn't affect the positioning.
 */
Draw the (simple) world
Notice how the camera doesn't affect the positioning.
Draw the ( simple ) world Notice how the camera doesn ' t affect the positioning .
void draw_field() {
	int i, j;
	for (j = 0; j < GRID_SIZE; j++) {
		for (i = 0; i < GRID_SIZE; i++) {
			glPushMatrix();
			glTranslatef(i * 2 - GRID_SIZE + 1, -2, j * 2 - GRID_SIZE + 1);
			if ((i + j) & 1) {
				glColor3ub(255, 255, 0);
			}
			else {
				glColor3ub(0, 255, 0);
			}
			glBegin(GL_QUADS);
				glVertex3f(-1, 0, -1);
				glVertex3f(-1, 0,  1);
				glVertex3f( 1, 0,  1);
				glVertex3f( 1, 0, -1);
			glEnd();
			glPopMatrix();
		}
	}
}
void draw_field ( ) { int i , j ; for ( j = 0 ; j < GRID_SIZE ; j ++ ) { for ( i = 0 ; i < GRID_SIZE ; i ++ ) { glPushMatrix ( ) ; glTranslatef ( i * 2 - GRID_SIZE + 1 , -2 , j * 2 - GRID_SIZE + 1 ) ; if ( ( i + j ) & 1 ) { glColor3ub ( 255 , 255 , 0 ) ; } else { glColor3ub ( 0 , 255 , 0 ) ; } glBegin ( GL_QUADS ) ; glVertex3f ( -1 , 0 , -1 ) ; glVertex3f ( -1 , 0 , 1 ) ; glVertex3f ( 1 , 0 , 1 ) ; glVertex3f ( 1 , 0 , -1 ) ; glEnd ( ) ; glPopMatrix ( ) ; } } }
Draw the (simple) world
 Notice how the camera doesn't affect the positioning.
Draw the ( simple ) world Notice how the camera doesn ' t affect the positioning .