D3D10CompileEffectFromMemory

D3D10CompileEffectFromMemory function

Compile an effect.

Note  Use D3DX10CompileFromMemory instead of this function.
 

Syntax


HRESULT D3D10CompileEffectFromMemory(
  _In_        void               *pData,
  _In_        SIZE_T             DataLength,
  _In_        LPCSTR             pSrcFileName,
  _In_  const D3D10_SHADER_MACRO *pDefines,
  _In_        ID3D10Include      *pInclude,
  _In_        UINT               HLSLFlags,
  _In_        UINT               FXFlags,
  _Out_       ID3D10Blob         **ppCompiledEffect,
  _Out_       ID3D10Blob         **ppErrors
);

Parameters

pData [in]

Type: void*

A pointer to effect data; either ASCII HLSL code or a compiled effect.

DataLength [in]

Type: SIZE_T

Length of pData.

pSrcFileName [in]

Type: LPCSTR

The name of the effect file.

pDefines [in]

Type: const D3D10_SHADER_MACRO*

Optional. An array of NULL-terminated macro definitions (see D3D10_SHADER_MACRO).

pInclude [in]

Type: ID3D10Include*

Optional. A pointer to an ID3D10Include Interface for handling include files. Setting this to NULL will cause a compile error if a shader contains a #include.

HLSLFlags [in]

Type: UINT

Shader compile options.

FXFlags [in]

Type: UINT

Effect compile options.

ppCompiledEffect [out]

Type: ID3D10Blob**

The address of a ID3D10Blob Interface that contains the compiled effect.

ppErrors [out]

Type: ID3D10Blob**

Optional. A pointer to an ID3D10Blob Interface that contains compiler error messages, or NULL if there were no errors.

Return value

Type: HRESULT

Returns one of the following Direct3D 10 Return Codes.

Remarks

This function uses the version of the HLSL compiler released in the November 2006 DirectX SDK.

For an example, see Compile an Effect (Direct3D 10).

Requirements

Header

D3D10Effect.h

Library

D3D10.lib

DLL

D3D10.dll

See also

Effect Functions (Direct3D 10)

 

 

Show:
© 2016 Microsoft