Exemplo n.º 1
0
void draw_drawing( BITMAP *bmp, drawingtype *drawing, float x, float y, float z ){
	int i ;
	
	if ( z > 0 ){
		drawing_mode(DRAW_MODE_TRANS,0,0,0);
		
		for ( i = 0; i < drawing->num_polys; i++ ){
			 color_poly( bmp, &drawing->poly[i], x, y, z );
		}
		for ( i = 0; i < drawing->num_polys; i++ ){
			draw_poly( bmp, &drawing->poly[i], x, y, z );
		}
		
		drawing_mode(DRAW_MODE_SOLID,0,0,0);
	}
}
Exemplo n.º 2
0
void keyboard_handler(unsigned char key, int x, int y)
{
	switch (key) {
		case 'c':
			color_poly();
			break;

		case 'f':
			if (!fullscreen)
				glutFullScreen();
			else
				glutReshapeWindow(window_width, window_height);
			
			fullscreen ^= 1;
			break;

		case 'q':
			exit(EXIT_SUCCESS);
	}

	glFlush();
}