TEAPOTS | Diana Vargas
#include <windows.h> #include <GL/glut.h> float ang=0.1, rotar=0, rotar1=0, rotar2=0; void iluminacion (int encendido){ if(encendido==1){ const GLfloat pos[4]={10, 10, 10};//poner afuera glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glLightfv(GL_LIGHT0, GL_POSITION, pos); } else{ glDisable(GL_LIGHTING); } } void aplicarMaterial(int encendido){ if(encendido==1) { GLfloat mat_red_ambient[] = {0.1745f, 0.01175f, 0.01175f, 0.55f}; GLfloat mat_red_diffuse[] = {0.61424f, 0.04136f, 0.04136f, 0.55f}; GLfloat mat_specular[] = {0.727811f, 0.626959f, 0.626959f, 0.55f}; //GLfloat mat_emission[] = { 0.0,0.2,0.0,0}; //...