A simple public manager for IRTShaderNode.
A simple public manager that creates and maintains IRTShaderNodes used by materials and other nodes in max. All creation and deletion of the objects is performed by the manager. The developer simply requests a new IRTShaderNode and releases it when finished. Internally the manager is responsible for maintaining the validity of the nodes, and performing Lost Devices routines on all nodes. It implements IEffectManager and manages all calls to the IEffectParser interfaces.
#include <IRTShaderNode.h>
Public Member Functions |
|
virtual IRTShaderNode * | AddShaderNode (Animatable *anim)=0 |
Register a new IRTShaderNode.
|
|
virtual void | RemoveShaderNode (IRTShaderNode *shadeNode)=0 |
When the animatable (e.g. |
|
virtual IRTShaderNode * | FindShaderNode (Animatable *anim)=0 |
Given an Animatable the associated IRTShaderNode
can be retrieved. |
|
Static Public Member Functions |
|
static DllExport IRTShaderManager * | GetRTShaderManager () |
Access to the IRTShaderManager
interface. |
virtual IRTShaderNode* AddShaderNode | ( | Animatable * | anim | ) | [pure virtual] |
Register a new IRTShaderNode.
THe developer can keep hold of this pointer until they release it. The Animatable pointer is used to look up the data in various methods internally and also the FindShaderNode.
[in] | anim | The associated Animatable for the render node |
virtual void RemoveShaderNode | ( | IRTShaderNode * | shadeNode | ) | [pure virtual] |
When the animatable (e.g.
a material) is being deleted the IRTShaderNode should be removed from the active list
[in] | shadeNode | The node to remove. |
virtual IRTShaderNode* FindShaderNode | ( | Animatable * | anim | ) | [pure virtual] |
Given an Animatable the associated IRTShaderNode can be retrieved.
An example is the background image display. A Bitmap can be displayed in the viewport background, so max checks to see if the currently assigned Texmap has a shader node registered. If it does it will use this to render the background, instead of the default software processing
[in] | anim | The Animatable to query |
static DllExport IRTShaderManager* GetRTShaderManager | ( | ) | [static] |
Access to the IRTShaderManager interface.
A developer would use something like the following.
IRTShaderManager * lpShaderMgr = IRTShaderManager::GetIRTShaderManager()
It is exported in the RTMax.dll