Author: ArcRiley
Date: 2007-07-03 22:48:31 -0400 (Tue, 03 Jul 2007)
New Revision: 344

Modified:
   trunk/pysoy/src/materials/Material.pxi
   trunk/pysoy/tests/lit_pyramid.py
Log:
making textures shaded


Modified: trunk/pysoy/src/materials/Material.pxi
===================================================================
--- trunk/pysoy/src/materials/Material.pxi      2007-07-04 02:41:41 UTC (rev 
343)
+++ trunk/pysoy/src/materials/Material.pxi      2007-07-04 02:48:31 UTC (rev 
344)
@@ -45,8 +45,14 @@
     _white[1] = 1.0
     _white[2] = 1.0
     _white[3] = 1.0
+    cdef float _grey[4]
+    _grey[0] = 0.5
+    _grey[1] = 0.5
+    _grey[2] = 0.5
+    _grey[3] = 0.5
     if self._colorTex :
-      gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT_AND_DIFFUSE, _white) 
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, _grey)
+      gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, _white)
       (<soy.textures.Texture> self._color)._bind()
     else :
       gl.glDisable(gl.GL_TEXTURE_1D)

Modified: trunk/pysoy/tests/lit_pyramid.py
===================================================================
--- trunk/pysoy/tests/lit_pyramid.py    2007-07-04 02:41:41 UTC (rev 343)
+++ trunk/pysoy/tests/lit_pyramid.py    2007-07-04 02:48:31 UTC (rev 344)
@@ -14,9 +14,9 @@
 cam.position = (0.0, 0.0, 5.0)
 pro = soy.widgets.Projector(win, size=(320, 240), camera=cam)
 pyr = soy.bodies.Pyramid(sce, tex)
-pyr.rotation = (1.0, 1.0, 0.0)
+pyr.rotation = (1.0, 0.0, 0.0)
 lig = soy.bodies.lights.Light(sce)
-lig.position = (1.0,1.0,3.0)
+lig.position = (-1.0,1.0,2.0)
 
 if __name__ == '__main__' :
   while True:

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to