D3DXMACRO

Describes preprocessor definitions used by an effect object.

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

Members

Name
Preprocessor name.
Definition
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".

See Also

D3DXCreateEffectFromFile