Hi,
I have a question about pausing and restarting a generalized image filter. In some databases I want a specific image filter and in other databases it has to be switched off. The code is something like this:
Self.thismanager = None
For database A:
if self.thismanager != None: return
self.thismanager = FilterManager(base.win, base.cam)
tex1 = Texture()
tex2 = Texture()
finalquad = self.thismanager.renderSceneInto(colortex=tex1)
interquad = self.thismanager.renderQuadInto(colortex=tex2)
interquad.setShader(Shader.load(“stage1.sha”))
interquad.setShaderInput(“tex1”, tex1)
finalquad.setShader(Shader.load(“stage2.sha”))
finalquad.setShaderInput(“tex2”, tex2)
For database B:
if self.thismanager == None:
self.thismanager.cleanup()
del self.thismanager
self.thismanager = None
This works without a problem.
However, if I then want to start database A again, the imagefilter is created again, and it give a long list of the following error:
Assertion failed: is_indexed at line 1505 of c:\buildslave\dev_sdk_win_amd64\build\panda3d\panda\src\gobj\geoPrimitive.cxx
Is there a simple way to stop an image filter like this, and start it again later withour having to stop the program and start again ?
Thanks.