Main Page | Class Hierarchy | Alphabetical List | Compound List | Compound Members

# IRdLWMaterial Struct Reference

Inherits IRsDataObject.

List of all members.

## Public Member Functions
HRESULT | Clear ()
HRESULT | PutShader ([in] BSTR dwShaderType,[out, retval] void **ppShaderData)
HRESULT | GetShader ([in] BSTR dwShaderType,[out, retval] void *ppShaderData)
HRESULT | GetShaderCount ([in] BSTR bShaderType,[out] RtDWORD *pdwAttributeCount)
HRESULT | PutMaterial ([in] RtMaterialGeneric matGeneric)
HRESULT | GetMaterial ([out, retval]RtMaterialGeneric *matGeneric)
HRESULT | LockObject ()
| Lock the object.
HRESULT | UnlockObject ()
| Unlock the object.

## Detailed Description

This dataobject represents material interface.

## Member Function Documentation

HRESULT IRdLWMaterial::Clear | ( |  | ) |

| Clear the dataobject

HRESULT IRdLWMaterial::PutShader | ( | [in] BSTR | dwShaderType,
|  | [out, retval] void ** | ppShaderData
| ) |

  | This method is used to add source code of specific shader into the material. Parameters:
  dwAttributeID | specifies the material attribute ID (material channel). 0xFFFFFFFF should be specified in case of default shader.
  bstrShaderType | specifies the shader type (the same as shader function prefix. i.e. color for the Color shader).
  bstrShaderName | specifies the shader name.
  bstrShaderText | specifies the shader code. Note that it is converted to ANSI charset internally

HRESULT IRdLWMaterial::GetShader | ( | [in] BSTR | dwShaderType,
|  | [out, retval] void * | ppShaderData
| ) |

  | This method is used to get source code of specific shader from the material. Parameters:
  dwAttributeID | specifies the material attribute ID (material channel). 0xFFFFFFFF should be specified in case of default shader.
  bstrShaderType | specifies the shader type (the same as shader function prefix. i.e. color for the Color shader).
  pbstrShaderName | is filled with shader name.
  pbstrShaderText | is filled with the shader code. Note that it is converted to ANSI charset internally
  Return values:
  S_FALSE | is returned if shader of specified type is not available for the attribute ID

HRESULT IRdLWMaterial::GetShaderCount | ( | [in] BSTR | bShaderType,
|  | [out] RtDWORD * | pdwAttributeCount
| ) |

  | This method is used to get the count of different attributes for given shader type. Parameters:
  bstrShaderType | specifies the shader type (the same as shader function prefix. i.e. color for the Color shader).
  pdwAttributeCount | is filled with the attribute count.

HRESULT IRdLWMaterial::PutMaterial | ( | [in] RtMaterialGeneric | matGeneric | ) |

  | This method is used to add source code of specific shader into the material. Parameters:
  dwAttributeID | specifies the material attribute ID (material channel). 0xFFFFFFFF should be specified in case of default material.
  bstrMaterialName | specifies the material name.
  bstrMaterialText | specifies the material code. Note that it is converted to ANSI charset internally

HRESULT IRdLWMaterial::GetMaterial | ( | [out, retval] RtMaterialGeneric * | matGeneric | ) |

  | This method is used to get source code of specific shader from the material. Parameters:
  dwAttributeID | specifies the material attribute ID (material channel). 0xFFFFFFFF should be specified in case of default material.
  pbstrMaterialName | is filled with the material name.
  pbstrMaterialText | is filled with the material code. Note that it is converted to ANSI charset internally
  Return values:
  S_FALSE | is returned if material is not available for the attribute ID

HRESULT IRdLWMaterial::LockObject | ( |  | ) |

| Lock the object.

HRESULT IRdLWMaterial::UnlockObject | ( |  | ) |

| Unlock the object.