3ds Max C++ API Reference
TargetBlendState Class Reference

This class holds the blend state for single render target. More...

#include <RenderStates.h>

+ Inheritance diagram for TargetBlendState:

Public Member Functions

virtual void SetBlendEnabled (bool value)
 Set the blending is enabled or not. More...
 
virtual bool GetBlendEnabled () const
 Get the blending is enabled or not. More...
 
virtual void SetSourceBlend (BlendSelector value)
 Set the blend factor for source color. More...
 
virtual BlendSelector GetSourceBlend () const
 Set the blend factor for source color. More...
 
virtual void SetDestinationBlend (BlendSelector value)
 Set the blend factor for destination color. More...
 
virtual BlendSelector GetDestinationBlend () const
 Get the blend factor for destination color /return current destination blend factor. More...
 
virtual void SetColorBlendOperation (BlendOperation value)
 Set the operation for color blending. More...
 
virtual BlendOperation GetColorBlendOperation () const
 Get the operation for color blending. More...
 
virtual void SetAlphaSourceBlend (BlendSelector value)
 Set the blend factor for source alpha. More...
 
virtual BlendSelector GetAlphaSourceBlend () const
 Get the blend factor for source alpha. More...
 
virtual void SetAlphaDestinationBlend (BlendSelector value)
 Set the blend factor for destination alpha. More...
 
virtual BlendSelector GetAlphaDestinationBlend () const
 Get the blend factor for destination alpha. More...
 
virtual void SetAlphaBlendOperation (BlendOperation value)
 Set the operation for alpha blending. More...
 
virtual BlendOperation GetAlphaBlendOperation () const
 Get the operation for alpha blending. More...
 
virtual void SetRenderTargetWriteMask (ColorWriteEnable mask)
 Indicates what color components(red, green, blue, alpha) are writable. More...
 
virtual ColorWriteEnable GetRenderTargetWriteMask () const
 Get color write mask /return current mask. More...
 

Protected Member Functions

 TargetBlendState ()
 
virtual ~TargetBlendState ()
 

Protected Attributes

bool mBlendEnabled
 The blending is enabled or not. More...
 
BlendSelector mSourceBlend
 The blend factor for source color. More...
 
BlendSelector mDestinationBlend
 The blend factor for destination color. More...
 
BlendOperation mColorBlendOperation
 The operation for color blending. More...
 
BlendSelector mAlphaSourceBlend
 The blend factor for source alpha. More...
 
BlendSelector mAlphaDestinationBlend
 The blend factor for destination alpha. More...
 
BlendOperation mAlphaBlendOperation
 The operation for alpha blending. More...
 
ColorWriteEnable mRenderTargetWriteMask
 Indicates what color components(red, green, blue, alpha) are writable. More...
 

Friends

class BlendState
 

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...
 

Detailed Description

This class holds the blend state for single render target.

Constructor & Destructor Documentation

◆ TargetBlendState()

TargetBlendState ( )
protected

◆ ~TargetBlendState()

virtual ~TargetBlendState ( )
inlineprotectedvirtual
225 {}

Member Function Documentation

◆ SetBlendEnabled()

virtual void SetBlendEnabled ( bool  value)
virtual

Set the blending is enabled or not.

Default value is false. /param value true to enable blending, false to disable

◆ GetBlendEnabled()

virtual bool GetBlendEnabled ( ) const
virtual

Get the blending is enabled or not.

/return true if enabled, false if not.

◆ SetSourceBlend()

virtual void SetSourceBlend ( BlendSelector  value)
virtual

Set the blend factor for source color.

Default value is BlendSelectorOne. /param value source blend factor

◆ GetSourceBlend()

virtual BlendSelector GetSourceBlend ( ) const
virtual

Set the blend factor for source color.

/return current source blend factor

◆ SetDestinationBlend()

virtual void SetDestinationBlend ( BlendSelector  value)
virtual

Set the blend factor for destination color.

Default value is BlendSelectorZero. /param value destination blend factor

◆ GetDestinationBlend()

virtual BlendSelector GetDestinationBlend ( ) const
virtual

Get the blend factor for destination color /return current destination blend factor.

◆ SetColorBlendOperation()

virtual void SetColorBlendOperation ( BlendOperation  value)
virtual

Set the operation for color blending.

Default value is BlendOperationAdd. /param value the operation for color blending

◆ GetColorBlendOperation()

virtual BlendOperation GetColorBlendOperation ( ) const
virtual

Get the operation for color blending.

/return the operation for color blending.

◆ SetAlphaSourceBlend()

virtual void SetAlphaSourceBlend ( BlendSelector  value)
virtual

Set the blend factor for source alpha.

Default value is BlendSelectorOne. /param value the blend factor for source alpha

◆ GetAlphaSourceBlend()

virtual BlendSelector GetAlphaSourceBlend ( ) const
virtual

Get the blend factor for source alpha.

/return the blend factor for source alpha

◆ SetAlphaDestinationBlend()

virtual void SetAlphaDestinationBlend ( BlendSelector  value)
virtual

Set the blend factor for destination alpha.

Default value is BlendSelectorZero. /param value blend factor for destination alpha

◆ GetAlphaDestinationBlend()

virtual BlendSelector GetAlphaDestinationBlend ( ) const
virtual

Get the blend factor for destination alpha.

/return the blend factor for destination alpha.

◆ SetAlphaBlendOperation()

virtual void SetAlphaBlendOperation ( BlendOperation  value)
virtual

Set the operation for alpha blending.

Default value is BlendOperationAdd. /param value the operation for alpha blending

◆ GetAlphaBlendOperation()

virtual BlendOperation GetAlphaBlendOperation ( ) const
virtual

Get the operation for alpha blending.

/return the operation for alpha blending.

◆ SetRenderTargetWriteMask()

virtual void SetRenderTargetWriteMask ( ColorWriteEnable  mask)
virtual

Indicates what color components(red, green, blue, alpha) are writable.

Default value is ColorWriteEnableRedGreenBlueAlpha. /param mask the write mask

◆ GetRenderTargetWriteMask()

virtual ColorWriteEnable GetRenderTargetWriteMask ( ) const
virtual

Get color write mask /return current mask.

Friends And Related Function Documentation

◆ BlendState

friend class BlendState
friend

Member Data Documentation

◆ mBlendEnabled

bool mBlendEnabled
protected

The blending is enabled or not.

By default it is false.

◆ mSourceBlend

BlendSelector mSourceBlend
protected

The blend factor for source color.

By default it is BlendSelectorOne.

◆ mDestinationBlend

BlendSelector mDestinationBlend
protected

The blend factor for destination color.

By default it is BlendSelectorZero.

◆ mColorBlendOperation

BlendOperation mColorBlendOperation
protected

The operation for color blending.

By default it is BlendOperationAdd.

◆ mAlphaSourceBlend

BlendSelector mAlphaSourceBlend
protected

The blend factor for source alpha.

By default it is BlendSelectorOne.

◆ mAlphaDestinationBlend

BlendSelector mAlphaDestinationBlend
protected

The blend factor for destination alpha.

By default it is BlendSelectorZero.

◆ mAlphaBlendOperation

BlendOperation mAlphaBlendOperation
protected

The operation for alpha blending.

By default it is BlendOperationAdd.

◆ mRenderTargetWriteMask

ColorWriteEnable mRenderTargetWriteMask
protected

Indicates what color components(red, green, blue, alpha) are writable.

By default it is ColorWriteEnableRedGreenBlueAlpha.