Пример #1
0
void display (void)
{
	glClearColor (0.0, 0.0, 0.0, 0.0);
	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glShadeModel (GL_SMOOTH);
	//glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );  // WIREFRAME
	
	displayFog();

	glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
	glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
	glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
	glLightfv(GL_LIGHT0, GL_POSITION, light_position);

	glMatrixMode (GL_MODELVIEW);
	glLoadIdentity();

	camera.update();

	glDisable(GL_CULL_FACE);
	skybox.display();
	glEnable(GL_CULL_FACE);

	table.display();
	drawShadows();
	mainGear.display();
	powerGear.display();
	smallMiddleGear.display();
	bigPowerGear.display();
	sideGear.display();
	sidePole.display();
	powerPole.display();
	powerPole2.display();
	powerPole3.display();
	powerPole4.display();
	sun.display();
	baseBox.display();
	coverBox.display();
	coverBox2.display();
	coverBox3.display();
	coverBox4.display();
	moonCylinder.display();
	drawPlanets();
	neptunePole.display();
	uranusPole.display();
	saturnPole.display();
	jupiterPole.display();
	marsPole.display();
	earthPole.display();
	venusPole.display();
	mercuryPole.display();
	saturnRingPole.display();

	glutSwapBuffers();
}
Пример #2
0
	void display(void)
	{
		planet.display();
		upPole.display();
		outPole.display();
	}