3ds Max C++ API Reference
HLSLMaterialHandle Class Reference

HLSLMaterialHandle is a material class to support HLSL custom material. More...

#include <HLSLMaterialHandle.h>

+ Inheritance diagram for HLSLMaterialHandle:

Classes

struct  ParameterDesc
 This is parameter description of HLSLMaterialHandle parameter. More...
 

Public Types

enum  ParameterType {
  ParameterTypeUnknown , ParameterTypeFloat , ParameterTypeInt , ParameterTypeBool ,
  ParameterTypePoint3 , ParameterTypePoint4 , ParameterTypeMatrix , ParameterTypeTexture ,
  ParameterTypeFloatArray , ParameterTypeIntArray , ParameterTypeBoolArray , ParameterTypePoint3Array ,
  ParameterTypePoint4Array , ParameterTypeMatrixArray
}
 This is parameter type of HLSLMaterialHandle parameter. More...
 

Public Member Functions

GraphicsDriverAPI HLSLMaterialHandle ()
 
GraphicsDriverAPI HLSLMaterialHandle (const HLSLMaterialHandle &from)
 
GraphicsDriverAPI HLSLMaterialHandleoperator= (const HLSLMaterialHandle &from)
 
virtual GraphicsDriverAPI ~HLSLMaterialHandle ()
 
GraphicsDriverAPI bool InitializeWithFile (const MSTR &fileName)
 Initialize an instance of HLSLMaterialHandle. More...
 
GraphicsDriverAPI bool InitializeWithString (const CStr &shaderContent)
 Initialize an instance of HLSLMaterialHandle with shader string. More...
 
GraphicsDriverAPI bool InitializeWithResource (int iShaderID, HINSTANCE hInst, const MSTR &strTypeName)
 Initialize an instance of HLSLMaterialHandle from resource. More...
 
virtual GraphicsDriverAPI const MaterialRequiredStreamsGetRequiredStreams () const
 Returns the material required streams to tell how to setup mesh data. More...
 
GraphicsDriverAPI int GetParameterCount () const
 Returns the parameter count of material. More...
 
GraphicsDriverAPI bool GetParameterDescription (int index, ParameterDesc &parameterDesc) const
 Returns the description of parameter. More...
 
GraphicsDriverAPI int GetParameterIndex (const MSTR &parameterName) const
 Returns the index of parameter. More...
 
GraphicsDriverAPI void SetIntParameter (const MSTR &parameterName, int value)
 Sets int parameter. More...
 
GraphicsDriverAPI void SetIntParameter (int index, int value)
 Sets int parameter. More...
 
GraphicsDriverAPI void SetIntArrayParameter (const MSTR &parameterName, const int *value, unsigned int count)
 Sets int array parameter. More...
 
GraphicsDriverAPI void SetIntArrayParameter (int index, const int *value, unsigned int count)
 Sets int array parameter. More...
 
GraphicsDriverAPI void SetFloatParameter (const MSTR &parameterName, float value)
 Sets float parameter. More...
 
GraphicsDriverAPI void SetFloatParameter (int index, float value)
 Sets float parameter. More...
 
GraphicsDriverAPI void SetFloatArrayParameter (const MSTR &parameterName, const float *value, unsigned int count)
 Sets float array parameter. More...
 
GraphicsDriverAPI void SetFloatArrayParameter (int index, const float *value, unsigned int count)
 Sets float array parameter. More...
 
GraphicsDriverAPI void SetBoolParameter (const MSTR &parameterName, BOOL value)
 Sets bool parameter. More...
 
GraphicsDriverAPI void SetBoolParameter (int index, BOOL value)
 Sets bool parameter. More...
 
GraphicsDriverAPI void SetBoolArrayParameter (const MSTR &parameterName, const BOOL *value, unsigned int count)
 Sets bool array parameter. More...
 
GraphicsDriverAPI void SetBoolArrayParameter (int index, const BOOL *value, unsigned int count)
 Sets bool array parameter. More...
 
GraphicsDriverAPI void SetFloat4Parameter (const MSTR &parameterName, const Point4 &value)
 Sets float4 parameter. More...
 
GraphicsDriverAPI void SetFloat4Parameter (int index, const Point4 &value)
 Sets float4 parameter. More...
 
GraphicsDriverAPI void SetFloat4ArrayParameter (const MSTR &parameterName, const Point4 *value, unsigned int count)
 Sets float4 array parameter. More...
 
GraphicsDriverAPI void SetFloat4ArrayParameter (int index, const Point4 *value, unsigned int count)
 Sets float4 array parameter. More...
 
GraphicsDriverAPI void SetFloat3Parameter (const MSTR &parameterName, const Point3 &value)
 Sets float3 parameter. More...
 
GraphicsDriverAPI void SetFloat3Parameter (int index, const Point3 &value)
 Sets float3 parameter. More...
 
GraphicsDriverAPI void SetFloat3ArrayParameter (const MSTR &parameterName, const Point3 *value, unsigned int count)
 Sets float3 array parameter. More...
 
GraphicsDriverAPI void SetFloat3ArrayParameter (int index, const Point3 *value, unsigned int count)
 Sets float3 array parameter. More...
 
GraphicsDriverAPI void SetMatrixParameter (const MSTR &parameterName, const Matrix44 &value)
 Sets matrix parameter. More...
 
GraphicsDriverAPI void SetMatrixParameter (int index, const Matrix44 &value)
 Sets matrix parameter. More...
 
GraphicsDriverAPI void SetMatrixArrayParameter (const MSTR &parameterName, const Matrix44 *value, unsigned int count)
 Sets matrix array parameter. More...
 
GraphicsDriverAPI void SetMatrixArrayParameter (int index, const Matrix44 *value, unsigned int count)
 Sets matrix array parameter. More...
 
GraphicsDriverAPI void SetTextureParameter (const MSTR &parameterName, const TextureHandle &textureHandle)
 Sets texture parameter. More...
 
GraphicsDriverAPI void SetTextureParameter (const MSTR &parameterName, const TargetHandle &textureHandle)
 Sets texture parameter. More...
 
GraphicsDriverAPI void SetTextureParameter (int index, const TextureHandle &textureHandle)
 Sets texture parameter. More...
 
GraphicsDriverAPI void SetTextureParameter (int index, const TargetHandle &textureHandle)
 Sets texture parameter. More...
 
GraphicsDriverAPI void SetBufferParameter (const MSTR &parameterName, const SmartHandle &bufferHandle)
 Sets buffer parameter. More...
 
GraphicsDriverAPI void SetBufferParameter (int index, const SmartHandle &bufferHandle)
 Sets buffer parameter. More...
 
GraphicsDriverAPI void SetMapChannelParameter (int textureCoordinateIndex, int maxMapChannel)
 Sets map channel parameter. More...
 
GraphicsDriverAPI void SetActiveTechniqueName (const MSTR &techniqueName)
 Sets technique name parameter. More...
 
GraphicsDriverAPI MSTR GetShaderErrorInformation ()
 Get shader compilation error information. More...
 
- Public Member Functions inherited from BaseMaterialHandle
GraphicsDriverAPI BaseMaterialHandle ()
 
GraphicsDriverAPI BaseMaterialHandle (const BaseMaterialHandle &from)
 
GraphicsDriverAPI BaseMaterialHandleoperator= (const BaseMaterialHandle &from)
 
virtual GraphicsDriverAPI ~BaseMaterialHandle ()
 
GraphicsDriverAPI void Activate (DrawContext &drawContext)
 Activates the material handle with the specified pipeline context. More...
 
GraphicsDriverAPI void Terminate ()
 Terminates the material handle, performing any cleanup required by the material handle. More...
 
GraphicsDriverAPI unsigned int GetPassCount (DrawContext &drawContext) const
 Retrieves the number of passes required to render the material handle. More...
 
GraphicsDriverAPI void ActivatePass (DrawContext &drawContext, unsigned int pass)
 Activates the specified pass of the material handle, at which point it may render geometry as necessary for the pass. More...
 
GraphicsDriverAPI void PassesFinished (DrawContext &drawContext)
 Called after all of the passes for the material handle have been drawn. 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

HLSLMaterialHandle is a material class to support HLSL custom material.

This class is used for viewport display and Quicksilver. It's used by RenderItemHandle::SetCustomMaterial() to describe HLSL custom material. It can also be used for realistic material display. see IHLSLMaterialTranslator for more details. How to use:

hMaterial.Initialize(shaderFileName);
hMaterial.SetFloatParameter(_M("myFloatShaderParam"), floatValue);
pItem->SetCustomMaterial(hMaterial); // pItem is an instance of RenderItemHandle
GraphicsDriverAPI HLSLMaterialHandle()
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67

Member Enumeration Documentation

◆ ParameterType

This is parameter type of HLSLMaterialHandle parameter.

Enumerator
ParameterTypeUnknown 

unknown parameter type

ParameterTypeFloat 

float type

ParameterTypeInt 

int type

ParameterTypeBool 

BOOL type.

ParameterTypePoint3 

Point3 type.

ParameterTypePoint4 

Point4 type.

ParameterTypeMatrix 

Matrix type.

ParameterTypeTexture 

texture type

ParameterTypeFloatArray 

float array type

ParameterTypeIntArray 

int array type

ParameterTypeBoolArray 

BOOL array type.

ParameterTypePoint3Array 

Point3 array type.

ParameterTypePoint4Array 

Point4 array type.

ParameterTypeMatrixArray 

Matrix array type.

42  {
58  };
@ ParameterTypePoint4
Point4 type.
Definition: HLSLMaterialHandle.h:48
@ ParameterTypeUnknown
unknown parameter type
Definition: HLSLMaterialHandle.h:43
@ ParameterTypeFloat
float type
Definition: HLSLMaterialHandle.h:44
@ ParameterTypePoint3Array
Point3 array type.
Definition: HLSLMaterialHandle.h:55
@ ParameterTypeFloatArray
float array type
Definition: HLSLMaterialHandle.h:52
@ ParameterTypeIntArray
int array type
Definition: HLSLMaterialHandle.h:53
@ ParameterTypeInt
int type
Definition: HLSLMaterialHandle.h:45
@ ParameterTypePoint3
Point3 type.
Definition: HLSLMaterialHandle.h:47
@ ParameterTypeBoolArray
BOOL array type.
Definition: HLSLMaterialHandle.h:54
@ ParameterTypeMatrixArray
Matrix array type.
Definition: HLSLMaterialHandle.h:57
@ ParameterTypePoint4Array
Point4 array type.
Definition: HLSLMaterialHandle.h:56
@ ParameterTypeMatrix
Matrix type.
Definition: HLSLMaterialHandle.h:49
@ ParameterTypeTexture
texture type
Definition: HLSLMaterialHandle.h:50
@ ParameterTypeBool
BOOL type.
Definition: HLSLMaterialHandle.h:46

Constructor & Destructor Documentation

◆ HLSLMaterialHandle() [1/2]

◆ HLSLMaterialHandle() [2/2]

◆ ~HLSLMaterialHandle()

virtual GraphicsDriverAPI ~HLSLMaterialHandle ( )
virtual

Member Function Documentation

◆ operator=()

◆ InitializeWithFile()

GraphicsDriverAPI bool InitializeWithFile ( const MSTR fileName)

Initialize an instance of HLSLMaterialHandle.

A HLSLMaterialHandle should be initialized before it's used.

Parameters
[in]fileNameHLSL shader file name.
Returns
true if successfully initialized, false otherwise.

◆ InitializeWithString()

GraphicsDriverAPI bool InitializeWithString ( const CStr shaderContent)

Initialize an instance of HLSLMaterialHandle with shader string.

A HLSLMaterialHandle should be initialized before it's used.

Parameters
[in]shaderContentHLSL shader content.
Returns
true if successfully initialized, false otherwise.

◆ InitializeWithResource()

GraphicsDriverAPI bool InitializeWithResource ( int  iShaderID,
HINSTANCE  hInst,
const MSTR strTypeName 
)

Initialize an instance of HLSLMaterialHandle from resource.

A HLSLMaterialHandle should be initialized before it's used.

Parameters
[in]iShaderIDresource ID of the shader
[in]hInstmodule instance handle
[in]strTypeNameresource block name
Returns
true if successfully initialized, false otherwise.

◆ GetRequiredStreams()

virtual GraphicsDriverAPI const MaterialRequiredStreams* GetRequiredStreams ( ) const
virtual

Returns the material required streams to tell how to setup mesh data.

Returns
the material required streams.

Reimplemented from BaseMaterialHandle.

◆ GetParameterCount()

GraphicsDriverAPI int GetParameterCount ( ) const

Returns the parameter count of material.

Returns
the parameter count.

◆ GetParameterDescription()

GraphicsDriverAPI bool GetParameterDescription ( int  index,
ParameterDesc parameterDesc 
) const

Returns the description of parameter.

Parameters
[in]indexThe parameter index.
[out]parameterDescThe parameter description
Returns
true if successful, otherwise false.

◆ GetParameterIndex()

GraphicsDriverAPI int GetParameterIndex ( const MSTR parameterName) const

Returns the index of parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
Returns
valid index if successful, otherwise -1

◆ SetIntParameter() [1/2]

GraphicsDriverAPI void SetIntParameter ( const MSTR parameterName,
int  value 
)

Sets int parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe int parameter value.

◆ SetIntParameter() [2/2]

GraphicsDriverAPI void SetIntParameter ( int  index,
int  value 
)

Sets int parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe int parameter value.

◆ SetIntArrayParameter() [1/2]

GraphicsDriverAPI void SetIntArrayParameter ( const MSTR parameterName,
const int value,
unsigned int  count 
)

Sets int array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of int array parameter value.
[in]countThe count of int array.

◆ SetIntArrayParameter() [2/2]

GraphicsDriverAPI void SetIntArrayParameter ( int  index,
const int value,
unsigned int  count 
)

Sets int array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of int array parameter value.
[in]countThe count of int array.

◆ SetFloatParameter() [1/2]

GraphicsDriverAPI void SetFloatParameter ( const MSTR parameterName,
float  value 
)

Sets float parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe parameter value.

◆ SetFloatParameter() [2/2]

GraphicsDriverAPI void SetFloatParameter ( int  index,
float  value 
)

Sets float parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe parameter value.

◆ SetFloatArrayParameter() [1/2]

GraphicsDriverAPI void SetFloatArrayParameter ( const MSTR parameterName,
const float *  value,
unsigned int  count 
)

Sets float array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of float array parameter value.
[in]countThe count of float array.

◆ SetFloatArrayParameter() [2/2]

GraphicsDriverAPI void SetFloatArrayParameter ( int  index,
const float *  value,
unsigned int  count 
)

Sets float array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of float array parameter value.
[in]countThe count of float array.

◆ SetBoolParameter() [1/2]

GraphicsDriverAPI void SetBoolParameter ( const MSTR parameterName,
BOOL  value 
)

Sets bool parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe parameter value.

◆ SetBoolParameter() [2/2]

GraphicsDriverAPI void SetBoolParameter ( int  index,
BOOL  value 
)

Sets bool parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe parameter value.

◆ SetBoolArrayParameter() [1/2]

GraphicsDriverAPI void SetBoolArrayParameter ( const MSTR parameterName,
const BOOL *  value,
unsigned int  count 
)

Sets bool array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of bool array parameter value.
[in]countThe count of bool array.

◆ SetBoolArrayParameter() [2/2]

GraphicsDriverAPI void SetBoolArrayParameter ( int  index,
const BOOL *  value,
unsigned int  count 
)

Sets bool array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of bool array parameter value.
[in]countThe count of bool array.

◆ SetFloat4Parameter() [1/2]

GraphicsDriverAPI void SetFloat4Parameter ( const MSTR parameterName,
const Point4 value 
)

Sets float4 parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe parameter value.

◆ SetFloat4Parameter() [2/2]

GraphicsDriverAPI void SetFloat4Parameter ( int  index,
const Point4 value 
)

Sets float4 parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe parameter value.

◆ SetFloat4ArrayParameter() [1/2]

GraphicsDriverAPI void SetFloat4ArrayParameter ( const MSTR parameterName,
const Point4 value,
unsigned int  count 
)

Sets float4 array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of float4 array parameter value.
[in]countThe count of float4 array.

◆ SetFloat4ArrayParameter() [2/2]

GraphicsDriverAPI void SetFloat4ArrayParameter ( int  index,
const Point4 value,
unsigned int  count 
)

Sets float4 array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of float4 array parameter value.
[in]countThe count of float4 array.

◆ SetFloat3Parameter() [1/2]

GraphicsDriverAPI void SetFloat3Parameter ( const MSTR parameterName,
const Point3 value 
)

Sets float3 parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe parameter value.

◆ SetFloat3Parameter() [2/2]

GraphicsDriverAPI void SetFloat3Parameter ( int  index,
const Point3 value 
)

Sets float3 parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe parameter value.

◆ SetFloat3ArrayParameter() [1/2]

GraphicsDriverAPI void SetFloat3ArrayParameter ( const MSTR parameterName,
const Point3 value,
unsigned int  count 
)

Sets float3 array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of float3 array parameter value.
[in]countThe count of float3 array.

◆ SetFloat3ArrayParameter() [2/2]

GraphicsDriverAPI void SetFloat3ArrayParameter ( int  index,
const Point3 value,
unsigned int  count 
)

Sets float3 array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of float3 array parameter value.
[in]countThe count of float3 array.

◆ SetMatrixParameter() [1/2]

GraphicsDriverAPI void SetMatrixParameter ( const MSTR parameterName,
const Matrix44 value 
)

Sets matrix parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe parameter value.

◆ SetMatrixParameter() [2/2]

GraphicsDriverAPI void SetMatrixParameter ( int  index,
const Matrix44 value 
)

Sets matrix parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe parameter value.

◆ SetMatrixArrayParameter() [1/2]

GraphicsDriverAPI void SetMatrixArrayParameter ( const MSTR parameterName,
const Matrix44 value,
unsigned int  count 
)

Sets matrix array parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]valueThe pointer of matrix array parameter value.
[in]countThe count of matrix array.

◆ SetMatrixArrayParameter() [2/2]

GraphicsDriverAPI void SetMatrixArrayParameter ( int  index,
const Matrix44 value,
unsigned int  count 
)

Sets matrix array parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]valueThe pointer of matrix array parameter value.
[in]countThe count of matrix array.

◆ SetTextureParameter() [1/4]

GraphicsDriverAPI void SetTextureParameter ( const MSTR parameterName,
const TextureHandle textureHandle 
)

Sets texture parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]textureHandleThe parameter texture handle value.

◆ SetTextureParameter() [2/4]

GraphicsDriverAPI void SetTextureParameter ( const MSTR parameterName,
const TargetHandle textureHandle 
)

Sets texture parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]textureHandleThe parameter texture handle value.

◆ SetTextureParameter() [3/4]

GraphicsDriverAPI void SetTextureParameter ( int  index,
const TextureHandle textureHandle 
)

Sets texture parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]textureHandleThe parameter texture handle value.

◆ SetTextureParameter() [4/4]

GraphicsDriverAPI void SetTextureParameter ( int  index,
const TargetHandle textureHandle 
)

Sets texture parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]textureHandleThe parameter texture handle value.

◆ SetBufferParameter() [1/2]

GraphicsDriverAPI void SetBufferParameter ( const MSTR parameterName,
const SmartHandle bufferHandle 
)

Sets buffer parameter.

Parameters
[in]parameterNameThe unique parameter name of the parameter.
[in]bufferHandleThe parameter VertexBufferHandle or IndexBufferHandle value. Note this buffer should be created with BufferUsageStatic | BufferUsageTarget usage flag

◆ SetBufferParameter() [2/2]

GraphicsDriverAPI void SetBufferParameter ( int  index,
const SmartHandle bufferHandle 
)

Sets buffer parameter.

Parameters
[in]indexThe parameter index of the parameter.
[in]bufferHandleThe parameter VertexBufferHandle or IndexBufferHandle value. Note this buffer should be created with BufferUsageStatic | BufferUsageTarget usage flag

◆ SetMapChannelParameter()

GraphicsDriverAPI void SetMapChannelParameter ( int  textureCoordinateIndex,
int  maxMapChannel 
)

Sets map channel parameter.

Parameters
[in]textureCoordinateIndexThe texture coordinate index of shader.
[in]maxMapChannelMap channel value of 3ds max.

◆ SetActiveTechniqueName()

GraphicsDriverAPI void SetActiveTechniqueName ( const MSTR techniqueName)

Sets technique name parameter.

Parameters
[in]techniqueNameThe active technique name.

◆ GetShaderErrorInformation()

GraphicsDriverAPI MSTR GetShaderErrorInformation ( )

Get shader compilation error information.

Returns
shader compilation error information. if shader is correct, the length of shader error information is 0.