Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

D3DXMACRO structure

Describes preprocessor definitions used by an effect object.

Syntax


typedef struct D3DXMACRO {
  LPCSTR Name;
  LPCSTR Definition;
} D3DXMACRO, *LPD3DXMACRO;

Members

Name

Type: LPCSTR

Preprocessor name.

Definition

Type: LPCSTR

Definition name.

Remarks

To use D3DXMACROs in more than one line, prefix each new line character with a backslash (like a #define in the C language). For example:



sample=
macro.Name = "DO_CODE_BLOCK";
macro.Definition =
    "/* here is a block of code */\\\n"
    "{ do something ... }\\\n";


Notice the 3 backslash characters at the end of the line. The first two are required to output a single '\', followed by the newline character "\n". Optionally, you may also want to terminate your lines using "\\\r\n".

Requirements

Header

D3dx9shader.h

See also

D3DXCreateEffectFromFile

 

 

Community Additions

ADD
Show:
© 2015 Microsoft