#include <mobu-python-api.h>
Shader manager.
This class provides access to the list of available shaders, both system shaders and user shaders. The list comes in two versions:
Both of these lists will have the same number of elements. The strings at position i in the lists refer to the same shader type. In cases where there is no localized version of the shader name, the internal name will be used in ShaderTypeNamesLocalized, thus ensuring consistency between the two lists. It also provides a generic shader creation method that uses the shader type name, internal or localized, to create the new shader instance. The destruction of shaders is achieved by calling the FBDelete method of a shader instance. The list of all the instantiated shaders can be obtained from instances of classes FBSystem or FBScene. Both classes have a Shaders property which lists the existing shader instances. Strings are used instead of enum, define or typedef values to refer to shader types as this proves to be more flexible.
Sample C++ code:
Sample Python code:
Public Member Functions | |
__reduce__ () | |
__init__ (object arg1) | |
object | CreateShader (FBShaderManager arg1, str arg2) |
Creates a shader according to the shader type provided. More... | |
Public Attributes | |
ORSDK2018::FBStringList | ShaderTypeNames |
List of available shaders. More... | |
ORSDK2018::FBStringList | ShaderTypeNamesLocalized |
List of available shaders. More... | |
__init__ | ( | object | arg1 | ) |
Python Docstring:
__init__( (object)arg1) -> None
C++ Constructors:
The reference documentation for the following C++ symbols may contain additional relevant information.
__reduce__ | ( | ) |
object CreateShader | ( | FBShaderManager | arg1, |
str | arg2 | ||
) |
Creates a shader according to the shader type provided.
Python Docstring:
CreateShader( (FBShaderManager)arg1, (str)arg2) -> object
C++ Signature:
ORSDK2018::FBShader * CreateShader(const char * pShaderTypeName)
This method provides a generic way of creating shaders using the type name, internal or localized. The name of the new shader will be the same as the type name used, subject to changes according to the system's unique name policy.
pShaderTypeName | Name of the type of shader desired. |
ORSDK2018::FBStringList ShaderTypeNames |
List of available shaders.
This list does provide the complete list of available shaders, both system defined and user defined.
ORSDK2018::FBStringList ShaderTypeNamesLocalized |
List of available shaders.
This list also provides the complete list of available shaders, but uses the localized named, as they can be seen in the GUI. The names in this list are a direct match to the items in the list ShaderTypeNames for a given index. This list is provided as a convenience, to avoid having to use the localization mechanism to match internal and GUI name.