generalized image filters


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(,
tex1 = Texture()
tex2 = Texture()
finalquad = self.thismanager.renderSceneInto(colortex=tex1)
interquad = self.thismanager.renderQuadInto(colortex=tex2)
interquad.setShaderInput(“tex1”, tex1)
finalquad.setShaderInput(“tex2”, tex2)

For database B:
if self.thismanager == None:
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 ?


I think this is related to the threading model: in config.prc I have set:
threading-model /Draw

When I remove that, I can switch between setting and disabling the generalized image filter between different databases without any errors.

So the FilterManager is possibly not thread safe. Does anyone have any suggestions how I can solve that (without disabling threading-model /Draw) ?

I have no particular suggestions, but the upcoming 1.9 version of Panda3D will have some fixes for threading issues, so I’d suggest disabling the threaded pipeline until the new release.