D3D10CreateEffectPoolFromMemory function (d3d10effect.h)

Create an effect pool (or shared memory location), to enable sharing variables between effects.

Syntax

HRESULT D3D10CreateEffectPoolFromMemory(
  [in]  void             *pData,
  [in]  SIZE_T           DataLength,
  [in]  UINT             FXFlags,
  [in]  ID3D10Device     *pDevice,
  [out] ID3D10EffectPool **ppEffectPool
);

Parameters

[in] pData

Type: void*

A pointer to a compiled effect.

[in] DataLength

Type: SIZE_T

Length of pData.

[in] FXFlags

Type: UINT

Effect compile options.

[in] pDevice

Type: ID3D10Device*

A pointer to the device (see ID3D10Device Interface).

[out] ppEffectPool

Type: ID3D10EffectPool**

A pointer to the ID3D10EffectPool Interface that contains the effect pool.

Return value

Type: HRESULT

Returns one of the following Direct3D 10 Return Codes.

Remarks

Note

Linking d3d10_1.lib gives you the implementation in d3d10_1.dll, which is the Direct3D10.1 programming model implementation. Linking d3d10.lib gives you the implementation in d3d10.dll, which is the Direct3D10 programming model implementation.

A pool is a shared location in memory. Effect variables that are located in a pool can be updated once, and the effect system will take care of updating each effect that uses that variable. To pool an effect variable, tell the effect to locate the variable in a pool when the effect is created, using a helper function such as D3DX10CreateEffectFromFile.

For help compiling an effect, see Compile an Effect (Direct3D 10).

Requirements

Requirement Value
Target Platform Windows
Header d3d10effect.h
Library d3d10_1.lib, d3d10.lib
DLL d3d10_1.dll, d3d10.dll

See also

Effect Functions (Direct3D 10)