Skip to content

D3DX11CreateEffectFromMemory

Chuck Walbourn edited this page May 14, 2021 · 4 revisions

Creates an effect from a complied shader blob in memory.

HRESULT WINAPI D3DX11CreateEffectFromMemory(
   LPCVOID pData, SIZE_T DataLength,
   UINT FXFlags,
   ID3D11Device *pDevice,
   ID3DX11Effect **ppEffect, LPCSTR srcName = nullptr );

Headers

#include <d3dcompiler.h>
#include "d3dx11effect.h"

Parameters

pData, DataLength: Pointer to memory buffer containing the compiled shader blob (should have been compiled using the fx_5_0 profile).

FXFlags: Same as D3DCompile Flags2. See D3DCOMPILE_EFFECT constants.

pDevice: Direct3D device for creating rendering resources and modifying state

ppEffect: Pointer to the newly created effect instance.

srcName: Optional source name used for 'debug object naming'

Remark

This is signature compatible with the original D3DX11CreateEffectFromMemory.

For Use

  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 7 Service Pack 1

For Development

  • Visual Studio 2022
  • Visual Studio 2019
  • clang/LLVM v12 - v20
  • CMake 3.21

Related Projects

DirectX Tool Kit

DirectXMesh

DirectXTex

DXCapsViewer

UVAtlas

DXUT11

DirectX SDK Samples

Clone this wiki locally