This reference page is linked to from the following overview topics: Porting Advanced Material and Texture Map Plug-ins to Nitrous.
Factory class for IShaderManager objects.
Material and texture map plug-ins based on programmable shaders need to create an IShaderManager for each of the shaders they use. The plug-in is responsible for destroying the IShaderManager instance. Call IShaderManagerCreator::GetInstance() to access the sole instance of IShaderManagerCreator.
#include <IShaderManager.h>
Public Member Functions |
|
virtual IShaderManager * | CreateShaderManager (IShaderManager::ShaderType type, const MCHAR *className, const MCHAR *shaderFileName, ReferenceTarget *pRefTarget)=0 |
Creates an
IShaderManager object based on a programmable shader. |
|
virtual void | DeleteShaderManager (IShaderManager *pShaderGraphManager)=0 |
Deletes an
IShaderManager instance. |
|
Static Public Member Functions |
|
static IShaderManagerCreator * | GetInstance () |
Retrieves the sole instance of IShaderManagerCreator.
|
virtual IShaderManager* CreateShaderManager | ( | IShaderManager::ShaderType | type, |
const MCHAR * | className, | ||
const MCHAR * | shaderFileName, | ||
ReferenceTarget * | pRefTarget | ||
) | [pure virtual] |
Creates an IShaderManager object based on a programmable shader.
Currently only MetaSL shaders are supported. A MetaSL shader's code is stored in a file. The shader itself has a type and a class name. The plug-in is responsible for the life-time management of the IShaderManager instance created by this method.
[in] | type | The type of the shader. Currently only MetaSL is supported. |
[in] | className | The shader's class name. |
[in] | shaderFileName | Fully qualified file path of the file that stores the shader's code. For a MetaSL shader this must be an xmsl file. |
[in] | pRefTarget | A pointer to the material or texture map plug-in the IShaderManager is created for. |
virtual void DeleteShaderManager | ( | IShaderManager * | pShaderGraphManager | ) | [pure virtual] |
Deletes an IShaderManager instance.
Material and texture map plug-ins that created IShaderManager instances need to call this function in order to delete them properly.
[in] | pShaderGraphManager | the instance of IShaderManager. |
static IShaderManagerCreator* GetInstance | ( | ) | [inline, static] |
Retrieves the sole instance of IShaderManagerCreator.
{ return dynamic_cast<IShaderManagerCreator*>(GetCOREInterface(ISHADER_MANAGER_CREATOR_INTERFACE_ID)); }