- Direction light source
- Position light source
- glLightfv( Light#, Attribute, …)
- GLfloat position[] = {10, 10, 10, W} glLightfv(GL_LIGHT0, GL_POSITION, position) If (W) is zero the position is treated as a direction (a 1x3 vector); otherwise, it is treated as a position (a 1x4 vector)
- glEnable(GL_LIGTHING)
- glEnable(GL_LIGHT0)
No comments:
Post a Comment