3ds Max C++ API Reference
CustomRenderStageHandle Class Reference

CustomRenderStageHandle is the base wrapper class of the custom render stage. More...

#include <CustomRenderStageHandle.h>

+ Inheritance diagram for CustomRenderStageHandle:

Public Member Functions

GraphicsDriverAPI CustomRenderStageHandle ()
 
GraphicsDriverAPI CustomRenderStageHandle (const CustomRenderStageHandle &from)
 
GraphicsDriverAPI CustomRenderStageHandleoperator= (const CustomRenderStageHandle &from)
 
virtual GraphicsDriverAPI ~CustomRenderStageHandle ()
 
GraphicsDriverAPI void Initialize ()
 Initialize this custom render stage. More...
 
GraphicsDriverAPI void Run ()
 Run the custom render stage. More...
 
virtual GraphicsDriverAPI void SetColorTarget (const TargetHandle &pColorTarget)
 Set the color target to the custom render stage. More...
 
virtual GraphicsDriverAPI TargetHandle GetColorTarget () const
 Get the color target of the custom render stage. More...
 
virtual GraphicsDriverAPI void SetDepthTarget (const TargetHandle &pDepthTarget)
 Set the depth target to the custom render stage. More...
 
virtual GraphicsDriverAPI TargetHandle GetDepthTarget () const
 Get the depth target of the custom render stage. More...
 
virtual GraphicsDriverAPI void SetRenderWorld (const RenderWorldHandle &pRenderWorld)
 Set the render world to the custom render stage. More...
 
virtual GraphicsDriverAPI RenderWorldHandle GetRenderWorld () const
 Get the render world of the custom render stage. More...
 
GraphicsDriverAPI void SetCamera (const MaxSDK::Graphics::CameraPtr &pCamera)
 Set the render camera to the custom render stage. More...
 
GraphicsDriverAPI const MaxSDK::Graphics::CameraPtrGetCamera () const
 Get the render camera of the custom render stage. More...
 
GraphicsDriverAPI void SetVisibilityGroup (MaxSDK::Graphics::RenderItemVisibilityGroup visibilityGroup)
 Set the visibility group to the custom render stage. More...
 
GraphicsDriverAPI MaxSDK::Graphics::RenderItemVisibilityGroup GetVisibilityGroup () const
 Get the visibility group of the custom render stage. More...
 
GraphicsDriverAPI void SetBackgroundColor (const AColor &color)
 Set the background color to the custom render stage. More...
 
GraphicsDriverAPI const AColorGetBackgroundColor () const
 Get the background color of the custom render stage. More...
 
GraphicsDriverAPI void SetViewport (const Point4 &viewport)
 Set the viewport to the custom render stage. More...
 
GraphicsDriverAPI const Point4GetViewport () const
 Get the viewport of the custom render stage. More...
 
GraphicsDriverAPI void SetClearDepth (bool bClear)
 Set whether we clear the depth buffer before running the custom render stage. More...
 
GraphicsDriverAPI bool GetClearDepth () const
 Get whether we clear the depth buffer before running the custom render stage. More...
 
GraphicsDriverAPI void SetClearColorBuffer (bool bClear)
 Set whether we clear the color buffer before running the custom render stage. More...
 
GraphicsDriverAPI bool GetClearColorBuffer () const
 Get whether we clear the color buffer before running the custom render stage. More...
 
GraphicsDriverAPI void SetOverrideMaterial (const BaseMaterialHandle &pOverrideMaterial)
 Set the override material to the custom render stage. More...
 
GraphicsDriverAPI BaseMaterialHandle GetOverrideMaterial () const
 Get the override material of the custom render stage. More...
 
GraphicsDriverAPI const EffectInstanceHandleGetOverrideEffectInstance () const
 Get the override effect instance handle of the custom render stage. More...
 
GraphicsDriverAPI void SetOverrideEffectInstance (const EffectInstanceHandle &effectInstanceHandle)
 Set the override effect instance handle to the custom render stage. More...
 
- Public Member Functions inherited from SmartHandle
virtual GraphicsDriverAPI ~SmartHandle ()
 destructor More...
 
GraphicsDriverAPI bool IsValid () const
 Check if this handle is valid. More...
 
GraphicsDriverAPI void Release ()
 Release the underlying graphics objects. More...
 
GraphicsDriverAPI Identifier GetObjectID () const
 Get the underlying graphics object id. More...
 
GraphicsDriverAPI void SetPointer (IRefObject *pObject)
 
GraphicsDriverAPI IRefObjectGetPointer () const
 Get the underlying graphics object pointer. More...
 
bool operator== (const SmartHandle &rhs) const
 
bool operator!= (const SmartHandle &rhs) const
 
bool operator< (const SmartHandle &rhs) const
 
bool operator<= (const SmartHandle &rhs) const
 
bool operator> (const SmartHandle &rhs) const
 
bool operator>= (const SmartHandle &rhs) const
 
GraphicsDriverAPI SmartHandle (const SmartHandle &)
 
GraphicsDriverAPI SmartHandleoperator= (const SmartHandle &)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from SmartHandle
GraphicsDriverAPI SmartHandle ()
 
- Protected Attributes inherited from SmartHandle
IRefObjectmpObject
 

Detailed Description

CustomRenderStageHandle is the base wrapper class of the custom render stage.

Constructor & Destructor Documentation

◆ CustomRenderStageHandle() [1/2]

◆ CustomRenderStageHandle() [2/2]

◆ ~CustomRenderStageHandle()

Member Function Documentation

◆ operator=()

◆ Initialize()

GraphicsDriverAPI void Initialize ( )

Initialize this custom render stage.

Returns
true if successfully initialized, false otherwise.

◆ Run()

Run the custom render stage.

◆ SetColorTarget()

virtual GraphicsDriverAPI void SetColorTarget ( const TargetHandle pColorTarget)
virtual

Set the color target to the custom render stage.

Parameters
[in]pColorTargetthe color target

◆ GetColorTarget()

virtual GraphicsDriverAPI TargetHandle GetColorTarget ( ) const
virtual

Get the color target of the custom render stage.

Returns
the color target of the custom render stage

◆ SetDepthTarget()

virtual GraphicsDriverAPI void SetDepthTarget ( const TargetHandle pDepthTarget)
virtual

Set the depth target to the custom render stage.

Parameters
[in]pDepthTargetthe depth target

◆ GetDepthTarget()

virtual GraphicsDriverAPI TargetHandle GetDepthTarget ( ) const
virtual

Get the depth target of the custom render stage.

Returns
the depth target of the custom render stage

◆ SetRenderWorld()

virtual GraphicsDriverAPI void SetRenderWorld ( const RenderWorldHandle pRenderWorld)
virtual

Set the render world to the custom render stage.

Parameters
[in]pRenderWorldthe render world

◆ GetRenderWorld()

virtual GraphicsDriverAPI RenderWorldHandle GetRenderWorld ( ) const
virtual

Get the render world of the custom render stage.

Returns
the render world of the custom render stage

◆ SetCamera()

GraphicsDriverAPI void SetCamera ( const MaxSDK::Graphics::CameraPtr pCamera)

Set the render camera to the custom render stage.

Parameters
[in]pCamerathe render camera

◆ GetCamera()

GraphicsDriverAPI const MaxSDK::Graphics::CameraPtr& GetCamera ( ) const

Get the render camera of the custom render stage.

Returns
the render camera of the custom render stage

◆ SetVisibilityGroup()

GraphicsDriverAPI void SetVisibilityGroup ( MaxSDK::Graphics::RenderItemVisibilityGroup  visibilityGroup)

Set the visibility group to the custom render stage.

Parameters
[in]visibilityGroupthe visibility group

◆ GetVisibilityGroup()

Get the visibility group of the custom render stage.

Returns
the visibility group of the custom render stage

◆ SetBackgroundColor()

GraphicsDriverAPI void SetBackgroundColor ( const AColor color)

Set the background color to the custom render stage.

Parameters
[in]colorthe background color

◆ GetBackgroundColor()

GraphicsDriverAPI const AColor& GetBackgroundColor ( ) const

Get the background color of the custom render stage.

Returns
the background color of the custom render stage

◆ SetViewport()

GraphicsDriverAPI void SetViewport ( const Point4 viewport)

Set the viewport to the custom render stage.

Parameters
[in]viewportthe viewport with .xy the left-top point of the viewport and .zw the right-bottom point of the viewport

◆ GetViewport()

GraphicsDriverAPI const Point4& GetViewport ( ) const

Get the viewport of the custom render stage.

Returns
the viewport of the custom render stage

◆ SetClearDepth()

GraphicsDriverAPI void SetClearDepth ( bool  bClear)

Set whether we clear the depth buffer before running the custom render stage.

Parameters
[in]bClearwhether we clear the depth buffer

◆ GetClearDepth()

GraphicsDriverAPI bool GetClearDepth ( ) const

Get whether we clear the depth buffer before running the custom render stage.

Returns
true if we clear the depth buffer before running the custom render stage or false otherwise

◆ SetClearColorBuffer()

GraphicsDriverAPI void SetClearColorBuffer ( bool  bClear)

Set whether we clear the color buffer before running the custom render stage.

Parameters
[in]bClearwhether we clear the depth buffer

◆ GetClearColorBuffer()

GraphicsDriverAPI bool GetClearColorBuffer ( ) const

Get whether we clear the color buffer before running the custom render stage.

Returns
true if we clear the color buffer before running the custom render stage or false otherwise

◆ SetOverrideMaterial()

GraphicsDriverAPI void SetOverrideMaterial ( const BaseMaterialHandle pOverrideMaterial)

Set the override material to the custom render stage.

Parameters
[in]pOverrideMaterialthe override material
Note
This call will replace any previously set override effect instance handle

◆ GetOverrideMaterial()

GraphicsDriverAPI BaseMaterialHandle GetOverrideMaterial ( ) const

Get the override material of the custom render stage.

Returns
the override material of the custom render stage

◆ GetOverrideEffectInstance()

GraphicsDriverAPI const EffectInstanceHandle& GetOverrideEffectInstance ( ) const

Get the override effect instance handle of the custom render stage.

Returns
the effect instance handle

◆ SetOverrideEffectInstance()

GraphicsDriverAPI void SetOverrideEffectInstance ( const EffectInstanceHandle effectInstanceHandle)

Set the override effect instance handle to the custom render stage.

Parameters
[in]effectInstanceHandlethe override effect instance handle
Note
This call will replace any previously set override material.
Using an override effect instance handle instead of an override material will let you load from the resource a compiled HLSL shader and use GPU debuggers. Use EffectHandle::InitializeWithResource to load a compiled shader from the resource file.