Commit c2557e72 authored by Guillaume Seguin's avatar Guillaume Seguin

Improve lighting settings for heavy model

parent f6a4c42c
......@@ -161,23 +161,20 @@ class wxGLPanel(wx.Panel):
def setup_lights(self):
glEnable(GL_LIGHTING)
glEnable(GL_LIGHT0)
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1)
glLightfv(GL_LIGHT0, GL_AMBIENT, vec(0.2, 0.2, 0.2, 1.0))
glDisable(GL_LIGHT0)
glLightfv(GL_LIGHT0, GL_AMBIENT, vec(0.4, 0.4, 0.4, 1.0))
glLightfv(GL_LIGHT0, GL_SPECULAR, vec(0, 0, 0, 0))
glLightfv(GL_LIGHT0, GL_DIFFUSE, vec(0, 0, 0, 0))
glEnable(GL_LIGHT1)
glLightfv(GL_LIGHT1, GL_AMBIENT, vec(0, 0, 0, 1.0))
glLightfv(GL_LIGHT1, GL_SPECULAR, vec(1., 1., 1., 1.))
glLightfv(GL_LIGHT1, GL_DIFFUSE, vec(0.72, 0.72, 0.72, 1))
glLightfv(GL_LIGHT1, GL_SPECULAR, vec(0.2, 0.2, 0.2, 1.0))
glLightfv(GL_LIGHT1, GL_POSITION, vec(1, 2, 3, 0))
glLightfv(GL_LIGHT1, GL_SPOT_EXPONENT, vec(1., 1., 1., 1.))
glEnable(GL_LIGHT2)
glLightfv(GL_LIGHT2, GL_AMBIENT, vec(0, 0, 0, 1.0))
glLightfv(GL_LIGHT2, GL_SPECULAR, vec(1., 1., 1., 1.))
glLightfv(GL_LIGHT2, GL_SPECULAR, vec(0.2, 0.2, 0.2, 1.0))
glLightfv(GL_LIGHT2, GL_DIFFUSE, vec(0.8, 0.8, 0.8, 1))
glLightfv(GL_LIGHT2, GL_POSITION, vec(-1, -1, 2, 0))
glEnable(GL_RESCALE_NORMAL)
glLightfv(GL_LIGHT2, GL_POSITION, vec(-1, -1, 3, 0))
glEnable(GL_NORMALIZE)
glShadeModel(GL_SMOOTH)
def reset_mview(self, factor):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment