KX_2DFilterManager(EXP_PyObjectPlus)¶
base class — EXP_PyObjectPlus
-
class
bge.types.
KX_2DFilterManager
(EXP_PyObjectPlus)¶ 2D filter manager used to add, remove and find filters in a scene.
-
addFilter
(index, type, fragmentProgram)¶ Add a filter to the pass index
index
, typetype
and fragment program if custom filter.- Parameters
index (integer) – The filter pass index.
type (integer) –
The filter type, one of:
fragmentProgram (string) – The filter shader fragment program. Specified only if
type
isbge.logic.RAS_2DFILTER_CUSTOMFILTER
. (optional)
- Returns
The 2D Filter.
- Return type
-
removeFilter
(index)¶ Remove filter to the pass index
index
.- Parameters
index (integer) – The filter pass index.
-
getFilter
(index)¶ Return filter to the pass index
index
.- Warning
If the 2D Filter is added with a
SCA_2DFilterActuator
, the filter will be available only after the 2D Filter program is linked. The python script to get the filter has to be executed one frame later. A delay sensor can be used.- Parameters
index (integer) – The filter pass index.
- Returns
The filter in the specified pass index or None.
- Return type
KX_2DFilter
or None
-