Ejemplo n.º 1
0
 void draw(){
     printf("WindowDer_draw\n");
     Window::draw();
     WindowA::draw();
     WindowB::draw();
     own_draw();
 }
Ejemplo n.º 2
0
void modelObject::draw()
{	
	glPushMatrix();
	if(position.x || position.y || position.z) glTranslatef(position.x,position.y,position.z);
	
	if(rotation.x) glRotatef(rotation.x,1.0,0.0,0.0);
	if(rotation.y) glRotatef(rotation.y,0.0,1.0,0.0);
	if(rotation.z) glRotatef(rotation.z,0.0,0.0,1.0);
	
	glScalef(scale.x,scale.y,scale.z);
	
	glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT,   material.ambient);
	glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE,   material.diffuse);
	glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,  material.specular);
	glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION,  material.emission);
	glMaterialf(GL_FRONT_AND_BACK,  GL_SHININESS, material.shininess);
	
	own_draw();
		
	glPopMatrix();
}
Ejemplo n.º 3
0
 void draw(){
     printf("WindowB_draw\n");
     own_draw();
     Window::draw();
 }