D3D10_SHADER_MACRO structure

Defines a shader macro.

Syntax


typedef struct D3D10_SHADER_MACRO {
  LPCSTR Name;
  LPCSTR Definition;
} D3D10_SHADER_MACRO, *LPD3D10_SHADER_MACRO;

Members

Name

Type: LPCSTR

The macro name.

Definition

Type: LPCSTR

The macro definition.

Remarks

You may use macros in your shaders. This enables the application to #define tokens at runtime, before the file is parsed. This structure defines a single macro. For example:



D3D10_SHADER_MACRO Shader_Macros[1] = { "zero", "0"  };


There are several shader or effect creation methods (such as D3D10CompileShader, D3DX10CreateEffectFromFile or D3DX10PreprocessShaderFromFile) that take an array of macros as an input parameter.

The D3D10_SHADER_MACRO structure is type defined in the D3D10shader.h header file as a D3D_SHADER_MACRO structure, which is fully defined in the D3DCommon.h header file.



typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO;

Requirements

Header

D3D10Shader.h

See also

Shader Structures

 

 

Community Additions

ADD
Show:
© 2015 Microsoft