SHARE
TWEET

Untitled

a guest Sep 13th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         GLint angle = 180;
  2.         GLint exp = 128;
  3.         glLightfv(GL_LIGHT1, GL_POSITION, eyePosition);
  4.         glLightiv(GL_LIGHT1, GL_SPOT_CUTOFF, &angle);
  5.         glLightiv(GL_LIGHT1, GL_SPOT_EXPONENT, &exp);
  6.         glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, focalPosition);
  7.  
  8.  
  9.         float ambient[] = {0.0f, 0.0f, 0.0f, 1.0f};
  10.         float diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};
  11.         float specular[] = {1.0f, 1.0f, 1.0f, 1.0f};
  12.  
  13.         glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
  14.         glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
  15.         glLightfv(GL_LIGHT1, GL_SPECULAR, specular);
RAW Paste Data
Top