コード例 #1
0
void drawShadows()
{
	GLfloat shadow_proj[16];
	glDisable(GL_TEXTURE_2D);
	glDisable(GL_LIGHTING);
	glDisable(GL_DEPTH_TEST);
	glEnable(GL_BLEND);
	glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	
	glPushMatrix();
    GLfloat plane_eq[] = {0.0, 1.0, 0.0, 0.0};
	ShadowHelper::shadow_matrix(light_position,plane_eq,shadow_proj);
	glMultMatrixf(shadow_proj);
		
	coverBox.displayShadow();
	coverBox2.displayShadow();
	coverBox3.displayShadow();
	coverBox4.displayShadow();
	mainGear.displayShadow();
	powerGear.displayShadow();
	smallMiddleGear.displayShadow();
	bigPowerGear.displayShadow();
	sideGear.displayShadow();
	sidePole.displayShadow();
	powerPole.displayShadow();
	powerPole2.displayShadow();
	powerPole3.displayShadow();
	powerPole4.displayShadow();
	sun.displayShadow();
	baseBox.displayShadow();
	moonCylinder.displayShadow();
	drawPlanetsShadow();
	saturnRingPole.displayShadow();
	
	neptunePole.displayShadow();   // ONLY one visible at set lighting angle . Inner MIddle POle
	//uranusPole.displayShadow();  
	//saturnPole.displayShadow();
	//jupiterPole.displayShadow();
	//marsPole.displayShadow();
	//earthPole.displayShadow();
	//venusPole.displayShadow();
	//mercuryPole.displayShadow();

	glPopMatrix();

	glDisable(GL_BLEND);
	glEnable(GL_DEPTH_TEST);
    glEnable(GL_LIGHTING);
}
コード例 #2
0
	void displayShadow(void)
	{
		planet.displayShadow();
		upPole.displayShadow();
		outPole.displayShadow();
	}