diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-03-25 13:33:39 +0300 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-03-25 13:33:39 +0300 |
commit | c844aa265ad4eb50ad0e18661470fa6092052728 (patch) | |
tree | c4a778ab1227e4266022fd076e8a0cb709badd13 /source/gameengine/PyDoc | |
parent | 3dd17cec3bcaa3885e14630e6a71a8486e9b2697 (diff) |
Big patches:
Erwin Coumans: Abstract the physics engine
Charlie C: Joystick fixes
Me: Moved the ray cast (shadows, mouse sensor & ray sensor)
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/KX_PolygonMaterial.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/gameengine/PyDoc/KX_PolygonMaterial.py b/source/gameengine/PyDoc/KX_PolygonMaterial.py index c86817a40f1..cfc4257f95d 100644 --- a/source/gameengine/PyDoc/KX_PolygonMaterial.py +++ b/source/gameengine/PyDoc/KX_PolygonMaterial.py @@ -120,7 +120,7 @@ class KX_PolygonMaterial: print "Shader failed to validate" return - def Activate(self, rasty, cachingInfo, mat): + def activate(self, rasty, cachingInfo, mat): self.pass_no+=1 if (self.pass_no == 1): glDisable(GL_COLOR_MATERIAL) @@ -246,7 +246,7 @@ class KX_PolygonMaterial: Example:: class PyMaterial: def __init__(self): - self.pass_no = 0 + self.pass_no = -1 def activate(self, rasty, cachingInfo, material): # Activate the material here. @@ -262,13 +262,14 @@ class KX_PolygonMaterial: # was added to # default material properties: + self.pass_no += 1 if self.pass_no == 0: material.activate(rasty, cachingInfo) - self.pass_no = 1 # Return True to do this pass return True - self.pass_no = 0 + # clean up and return False to finish. + self.pass_no = -1 return False # Create a new Python Material and pass it to the renderer. |