From c844aa265ad4eb50ad0e18661470fa6092052728 Mon Sep 17 00:00:00 2001 From: Kester Maddock Date: Fri, 25 Mar 2005 10:33:39 +0000 Subject: Big patches: Erwin Coumans: Abstract the physics engine Charlie C: Joystick fixes Me: Moved the ray cast (shadows, mouse sensor & ray sensor) --- source/gameengine/PyDoc/KX_PolygonMaterial.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/gameengine/PyDoc') 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. -- cgit v1.2.3