Microsoft DirectX 8.1 (C++) |
Creates an effect from an effect file. An effect file is a text file.
HRESULT WINAPI D3DXCreateEffectFromFile( LPDIRECT3DDEVICE8 pDevice, LPCTSTR pSrcFile, LPD3DXEFFECT* ppEffect, LPD3DXBUFFER* ppCompilationErrors );
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one of the following values.
D3DERR_INVALIDCALL |
D3DXERR_INVALIDDATA |
This functions supports both Unicode and ANSI strings.
Effects can be created from a sequence of instructions in text strings, an effect file, or a Microsoft® Windows® resource. D3DXCreateEffectFromFile creates effect files from an effect file and is illustrated in the water sample.
Header: Declared in D3dx8effect.h.
Import Library: Use D3dx8.lib.
D3DXCreateEffect, D3DXCreateEffectFromResource, Effect File Format