Changeset 20487

Show
Ignore:
Timestamp:
07/08/07 08:44:32 (1 year ago)
Author:
patrick
Message:

MF12 r20485: With VR Juggler 2.2, OpenSG and OSG applications do not have to

include lighting code just to make the simulator components
render well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PyJuggler/trunk/examples/python/pyopensgnav/pyopensgnav.py

    r19730 r20487  
    149149 
    150150   def _initGLState(self): 
    151       glLight(GL_LIGHT0, GL_AMBIENT, [0.1, 0.1, 0.1, 1.0]) 
    152       glLight(GL_LIGHT0, GL_DIFFUSE, [0.7, 0.7, 0.7, 1.0]) 
    153       glLight(GL_LIGHT0, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0]) 
    154       glLight(GL_LIGHT0, GL_POSITION, [0.5, 0.75, 0.75, 0.0]) 
    155  
    156       glMaterial(GL_FRONT, GL_AMBIENT, [0.7, 0.7, 0.7, 1.0]) 
    157       glMaterial(GL_FRONT, GL_DIFFUSE, [1.0, 0.5, 0.8, 1.0]) 
    158       glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0]) 
    159       glMaterial(GL_FRONT, GL_SHININESS, [50.0]) 
    160       glMaterial(GL_FRONT, GL_EMISSION, [0.0, 0.0, 0.0, 1.0]) 
    161  
    162       glEnable(GL_DEPTH_TEST) 
    163       glEnable(GL_LIGHTING) 
    164       glEnable(GL_LIGHT0) 
    165       glEnable(GL_COLOR_MATERIAL) 
    166       glShadeModel(GL_SMOOTH) 
    167  
    168151      # OpenSG does not handle this yet. Being smart about it is non-trivial. 
    169152      glEnable(GL_NORMALIZE)