mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix bug reported by clcheung
This commit is contained in:
parent
4271960b92
commit
e6202122ba
@ -50,8 +50,8 @@ class CommonFilters:
|
|||||||
def __init__(self, win, cam):
|
def __init__(self, win, cam):
|
||||||
self.manager = FilterManager(win, cam)
|
self.manager = FilterManager(win, cam)
|
||||||
self.configuration = {}
|
self.configuration = {}
|
||||||
|
self.task = None
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
self.task = taskMgr.add(self.update, "common-filters-update")
|
|
||||||
|
|
||||||
def loadShader(self, name):
|
def loadShader(self, name):
|
||||||
fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), name)
|
fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), name)
|
||||||
@ -65,6 +65,9 @@ class CommonFilters:
|
|||||||
self.finalQuad = None
|
self.finalQuad = None
|
||||||
self.bloom = []
|
self.bloom = []
|
||||||
self.blur = []
|
self.blur = []
|
||||||
|
if self.task != None:
|
||||||
|
taskMgr.remove(self.task)
|
||||||
|
self.task = None
|
||||||
|
|
||||||
def reconfigure(self, fullrebuild, changed):
|
def reconfigure(self, fullrebuild, changed):
|
||||||
|
|
||||||
@ -230,6 +233,8 @@ class CommonFilters:
|
|||||||
self.finalQuad.setShader(Shader.make(text))
|
self.finalQuad.setShader(Shader.make(text))
|
||||||
for tex in self.textures:
|
for tex in self.textures:
|
||||||
self.finalQuad.setShaderInput("tx"+tex, self.textures[tex])
|
self.finalQuad.setShaderInput("tx"+tex, self.textures[tex])
|
||||||
|
|
||||||
|
self.task = taskMgr.add(self.update, "common-filters-update")
|
||||||
|
|
||||||
if (changed == "CartoonInk") or fullrebuild:
|
if (changed == "CartoonInk") or fullrebuild:
|
||||||
if (configuration.has_key("CartoonInk")):
|
if (configuration.has_key("CartoonInk")):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user