Статья: OpenGL и Delphi на практике

glLoadIdentity;

glTranslatef(0.0,-1.0,-6.0);

glLightModel(GL_LIGHT_MODEL_LOCAL_VIEWER,Ord(True));

glLightModelfv(GL_LIGHT_MODEL_AMBIENT,@lm);

glLightfv(GL_LIGHT0,GL_AMBIENT,@light_ambient);

glLightfv(GL_LIGHT0,GL_DIFFUSE,@light_diffuse);

glLightfv(GL_LIGHT0,GL_SPECULAR,@light_specular);

glLightfv(GL_LIGHT0,GL_POSITION,@light_position);

glLightf(GL_LIGHT0,GL_SPOT_EXPONENT,8);

glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,170);

glLightfv(GL_LIGHT0,GL_SPOT_DIRECTION,@light_spotdirection);

glEnable(GL_LIGHTING);

glEnable(GL_LIGHT0);

glEnable(GL_DEPTH_TEST);

glEnable(GL_NORMALIZE);

glEnable(GL_COLOR_MATERIAL);

end;

end.

К-во Просмотров: 389
Бесплатно скачать Статья: OpenGL и Delphi на практике