Fix bug reported by clcheung

This commit is contained in:
rdb 2009-05-23 07:46:43 +00:00
parent 4271960b92
commit e6202122ba

View File

@ -50,8 +50,8 @@ class CommonFilters:
def __init__(self, win, cam):
self.manager = FilterManager(win, cam)
self.configuration = {}
self.task = None
self.cleanup()
self.task = taskMgr.add(self.update, "common-filters-update")
def loadShader(self, name):
fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), name)
@ -65,6 +65,9 @@ class CommonFilters:
self.finalQuad = None
self.bloom = []
self.blur = []
if self.task != None:
taskMgr.remove(self.task)
self.task = None
def reconfigure(self, fullrebuild, changed):
@ -231,6 +234,8 @@ class CommonFilters:
for tex in self.textures:
self.finalQuad.setShaderInput("tx"+tex, self.textures[tex])
self.task = taskMgr.add(self.update, "common-filters-update")
if (changed == "CartoonInk") or fullrebuild:
if (configuration.has_key("CartoonInk")):
separation = configuration["CartoonInk"]