Export (0) Print
Expand All

D3DX10PreprocessShaderFromResource function

Note  Instead of using this legacy function, we recommend that you use the D3DPreprocess API.

Create a shader from a resource without compiling it.

Syntax


HRESULT D3DX10PreprocessShaderFromResource(
  _In_   HMODULE hModule,
  _In_   LPCTSTR pResourceName,
  _In_   LPCTSTR pSrcFileName,
  _In_   const D3D10_SHADER_MACRO *pDefines,
  _In_   LPD3D10INCLUDE pInclude,
  _In_   ID3DX10ThreadPump *pPump,
  _Out_  ID3D10Blob **ppShaderText,
  _Out_  ID3D10Blob **ppErrorMsgs
);

Parameters

hModule [in]

Type: HMODULE

Handle to the resource module containing the shader. HMODULE can be obtained with GetModuleHandle Function.

pResourceName [in]

Type: LPCTSTR

The name of the resource in side hModule containing the shader. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

pSrcFileName [in]

Type: LPCTSTR

Optional. Effect file name, which is used for error messages only. Can be NULL.

pDefines [in]

Type: const D3D10_SHADER_MACRO*

A NULL-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to NULL to specify no macros.

pInclude [in]

Type: LPD3D10INCLUDE

A pointer to an include interface (see ID3D10Include Interface); set this to NULL to specify there is no include file.

pPump [in]

Type: ID3DX10ThreadPump*

A pointer to a thread pump interface (see ID3DX10ThreadPump Interface). Use NULL to specify that this function should not return until it is completed.

ppShaderText [out]

Type: ID3D10Blob**

A pointer to memory (see ID3D10Blob Interface) that contains the uncompiled shader.

ppErrorMsgs [out]

Type: ID3D10Blob**

The address of a pointer to memory (see ID3D10Blob Interface) that contains effect-creation errors, if any occurred.

Return value

Type: HRESULT

The return value is one of the values listed in Direct3D 10 Return Codes.

Requirements

Header

D3DX10.h

Library

D3DX10.lib

See also

General Purpose Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft