Public Member Functions | Static Public Member Functions

IRTShaderManager Class Reference

Search for all occurrences

Detailed Description

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>

Inheritance diagram for IRTShaderManager:
Inheritance graph
[legend]

List of all members.

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.

Member Function Documentation

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.

Parameters:
[in] anim The associated Animatable for the render node
Returns:
A pointer to a new IRTShaderNode object.
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

Parameters:
[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

Parameters:
[in] anim The Animatable to query
Returns:
The corresponding shader node, or NULL if nothing is found
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

Returns:
Access to the IRTShaderManager singleton

IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager
IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager IRTShaderManager