RetroArch
d3dx8effect.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) Microsoft Corporation. All Rights Reserved.
4  *
5  * File: d3dx8effect.h
6  * Content: D3DX effect types and functions
7  */
8 
9 #include "d3dx8.h"
10 
11 #ifndef __D3DX8EFFECT_H__
12 #define __D3DX8EFFECT_H__
13 
14 
15 #define D3DXFX_DONOTSAVESTATE (1 << 0)
16 
17 
18 typedef enum _D3DXPARAMETERTYPE
19 {
29  D3DXPT_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
30 
32 
33 
34 typedef struct _D3DXEFFECT_DESC
35 {
38 
40 
41 
42 typedef struct _D3DXPARAMETER_DESC
43 {
44  LPCSTR Name;
45  LPCSTR Index;
47 
49 
50 
51 typedef struct _D3DXTECHNIQUE_DESC
52 {
53  LPCSTR Name;
54  LPCSTR Index;
56 
58 
59 
60 typedef struct _D3DXPASS_DESC
61 {
62  LPCSTR Name;
63  LPCSTR Index;
64 
66 
67 
68 
69 /*
70  * ID3DXEffect
71  */
72 
73 typedef interface ID3DXEffect ID3DXEffect;
74 typedef interface ID3DXEffect *LPD3DXEFFECT;
75 
76 /* {648B1CEB-8D4E-4d66-B6FA-E44969E82E89} */
77 DEFINE_GUID( IID_ID3DXEffect,
78 0x648b1ceb, 0x8d4e, 0x4d66, 0xb6, 0xfa, 0xe4, 0x49, 0x69, 0xe8, 0x2e, 0x89);
79 
80 
81 #undef INTERFACE
82 #define INTERFACE ID3DXEffect
83 
85 {
86  /* IUnknown */
87  STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
88  STDMETHOD_(ULONG, AddRef)(THIS) PURE;
89  STDMETHOD_(ULONG, Release)(THIS) PURE;
90 
91  /* ID3DXEffect */
92  STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
93  STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
94  STDMETHOD(GetParameterDesc)(THIS_ LPCSTR pParameter, D3DXPARAMETER_DESC* pDesc) PURE;
95  STDMETHOD(GetTechniqueDesc)(THIS_ LPCSTR pTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
96  STDMETHOD(GetPassDesc)(THIS_ LPCSTR pTechnique, LPCSTR pPass, D3DXPASS_DESC* pDesc) PURE;
97  STDMETHOD(FindNextValidTechnique)(THIS_ LPCSTR pTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
98  STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE8 pDevice, LPD3DXEFFECT* ppEffect) PURE;
99  STDMETHOD(GetCompiledEffect)(THIS_ LPD3DXBUFFER* ppCompiledEffect) PURE;
100 
101  STDMETHOD(SetTechnique)(THIS_ LPCSTR pTechnique) PURE;
102  STDMETHOD(GetTechnique)(THIS_ LPCSTR* ppTechnique) PURE;
103 
104  STDMETHOD(SetDword)(THIS_ LPCSTR pParameter, DWORD dw) PURE;
105  STDMETHOD(GetDword)(THIS_ LPCSTR pParameter, DWORD* pdw) PURE;
106  STDMETHOD(SetFloat)(THIS_ LPCSTR pParameter, FLOAT f) PURE;
107  STDMETHOD(GetFloat)(THIS_ LPCSTR pParameter, FLOAT* pf) PURE;
108  STDMETHOD(SetVector)(THIS_ LPCSTR pParameter, CONST D3DXVECTOR4* pVector) PURE;
109  STDMETHOD(GetVector)(THIS_ LPCSTR pParameter, D3DXVECTOR4* pVector) PURE;
110  STDMETHOD(SetMatrix)(THIS_ LPCSTR pParameter, CONST D3DXMATRIX* pMatrix) PURE;
111  STDMETHOD(GetMatrix)(THIS_ LPCSTR pParameter, D3DXMATRIX* pMatrix) PURE;
112  STDMETHOD(SetTexture)(THIS_ LPCSTR pParameter, LPDIRECT3DBASETEXTURE8 pTexture) PURE;
113  STDMETHOD(GetTexture)(THIS_ LPCSTR pParameter, LPDIRECT3DBASETEXTURE8 *ppTexture) PURE;
114  STDMETHOD(SetVertexShader)(THIS_ LPCSTR pParameter, DWORD Handle) PURE;
115  STDMETHOD(GetVertexShader)(THIS_ LPCSTR pParameter, DWORD* pHandle) PURE;
116  STDMETHOD(SetPixelShader)(THIS_ LPCSTR pParameter, DWORD Handle) PURE;
117  STDMETHOD(GetPixelShader)(THIS_ LPCSTR pParameter, DWORD* pHandle) PURE;
118  STDMETHOD(SetString)(THIS_ LPCSTR pParameter, LPCSTR pString) PURE;
119  STDMETHOD(GetString)(THIS_ LPCSTR pParameter, LPCSTR* ppString) PURE;
120  STDMETHOD_(BOOL, IsParameterUsed)(THIS_ LPCSTR pParameter) PURE;
121 
122  STDMETHOD(Validate)(THIS) PURE;
123  STDMETHOD(Begin)(THIS_ UINT *pPasses, DWORD Flags) PURE;
124  STDMETHOD(Pass)(THIS_ UINT Pass) PURE;
125  STDMETHOD(End)(THIS) PURE;
126  STDMETHOD(OnLostDevice)(THIS) PURE;
127  STDMETHOD(OnResetDevice)(THIS) PURE;
128 };
129 
130 
131 
132 /*
133  * APIs
134  */
135 
136 
137 #ifdef __cplusplus
138 extern "C" {
139 #endif /* __cplusplus */
140 
141 
142 /*
143  * D3DXCreateEffect:
144  * -----------------
145  * Creates an effect from an ascii or binaray effect description.
146  *
147  * Parameters:
148  * pDevice
149  * Pointer of the device on which to create the effect
150  * pSrcFile
151  * Name of the file containing the effect description
152  * hSrcModule
153  * Module handle. if NULL, current module will be used.
154  * pSrcResource
155  * Resource name in module
156  * pSrcData
157  * Pointer to effect description
158  * SrcDataSize
159  * Size of the effect description in bytes
160  * ppEffect
161  * Returns a buffer containing created effect.
162  * ppCompilationErrors
163  * Returns a buffer containing any error messages which occurred during
164  * compile. Or NULL if you do not care about the error messages.
165  *
166  */
167 
168 HRESULT WINAPI
170  LPDIRECT3DDEVICE8 pDevice,
171  LPCSTR pSrcFile,
172  LPD3DXEFFECT* ppEffect,
173  LPD3DXBUFFER* ppCompilationErrors);
174 
175 HRESULT WINAPI
177  LPDIRECT3DDEVICE8 pDevice,
178  LPCWSTR pSrcFile,
179  LPD3DXEFFECT* ppEffect,
180  LPD3DXBUFFER* ppCompilationErrors);
181 
182 #ifdef UNICODE
183 #define D3DXCreateEffectFromFile D3DXCreateEffectFromFileW
184 #else
185 #define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA
186 #endif
187 
188 
189 HRESULT WINAPI
191  LPDIRECT3DDEVICE8 pDevice,
192  HMODULE hSrcModule,
193  LPCSTR pSrcResource,
194  LPD3DXEFFECT* ppEffect,
195  LPD3DXBUFFER* ppCompilationErrors);
196 
197 HRESULT WINAPI
199  LPDIRECT3DDEVICE8 pDevice,
200  HMODULE hSrcModule,
201  LPCWSTR pSrcResource,
202  LPD3DXEFFECT* ppEffect,
203  LPD3DXBUFFER* ppCompilationErrors);
204 
205 #ifdef UNICODE
206 #define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceW
207 #else
208 #define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA
209 #endif
210 
211 
212 HRESULT WINAPI
214  LPDIRECT3DDEVICE8 pDevice,
215  LPCVOID pSrcData,
216  UINT SrcDataSize,
217  LPD3DXEFFECT* ppEffect,
218  LPD3DXBUFFER* ppCompilationErrors);
219 
220 
221 #ifdef __cplusplus
222 }
223 #endif /* __cplusplus */
224 
225 #endif /* __D3DX8EFFECT_H__ */
HRESULT WINAPI D3DXCreateEffectFromResourceA(LPDIRECT3DDEVICE8 pDevice, HMODULE hSrcModule, LPCSTR pSrcResource, LPD3DXEFFECT *ppEffect, LPD3DXBUFFER *ppCompilationErrors)
Definition: d3dx8effect.h:51
struct IDirect3DDevice8 * LPDIRECT3DDEVICE8
Definition: d3d8.h:326
Definition: d3d8types.h:77
struct _D3DXPARAMETER_DESC D3DXPARAMETER_DESC
interface ID3DXEffect ID3DXEffect
Definition: d3dx8effect.h:73
Definition: glslang_tab.cpp:129
LPCSTR Index
Definition: d3dx8effect.h:54
LPCSTR Name
Definition: d3dx8effect.h:44
Definition: d3dx8effect.h:42
Definition: d3dx8effect.h:23
GLfloat f
Definition: glext.h:8207
D3DXPARAMETERTYPE Type
Definition: d3dx8effect.h:46
UINT Parameters
Definition: d3dx8effect.h:36
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
LPCSTR Index
Definition: d3dx8effect.h:45
struct IDirect3DBaseTexture8 * LPDIRECT3DBASETEXTURE8
Definition: d3d8.h:630
HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE8 pDevice, LPCVOID pSrcData, UINT SrcDataSize, LPD3DXEFFECT *ppEffect, LPD3DXBUFFER *ppCompilationErrors)
Definition: d3dx8effect.h:26
Definition: d3dx8effect.h:29
Definition: d3dx8effect.h:21
LPCSTR Name
Definition: d3dx8effect.h:62
Definition: d3dx8math.h:127
Definition: d3dx8effect.h:27
Definition: d3dx8effect.h:25
HRESULT WINAPI D3DXCreateEffectFromFileW(LPDIRECT3DDEVICE8 pDevice, LPCWSTR pSrcFile, LPD3DXEFFECT *ppEffect, LPD3DXBUFFER *ppCompilationErrors)
struct _D3DXPASS_DESC D3DXPASS_DESC
UINT Techniques
Definition: d3dx8effect.h:37
Definition: d3dx8effect.h:20
Definition: ffmpeg_fft.c:42
Definition: d3dx8effect.h:28
LPCSTR Index
Definition: d3dx8effect.h:63
UINT Passes
Definition: d3dx8effect.h:55
LPCSTR Name
Definition: d3dx8effect.h:53
_D3DXPARAMETERTYPE
Definition: d3dx8effect.h:18
struct _D3DXEFFECT_DESC D3DXEFFECT_DESC
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
HRESULT WINAPI D3DXCreateEffectFromFileA(LPDIRECT3DDEVICE8 pDevice, LPCSTR pSrcFile, LPD3DXEFFECT *ppEffect, LPD3DXBUFFER *ppCompilationErrors)
unsigned int BOOL
Definition: gctypes.h:51
DEFINE_GUID(IID_ID3DXEffect, 0x648b1ceb, 0x8d4e, 0x4d66, 0xb6, 0xfa, 0xe4, 0x49, 0x69, 0xe8, 0x2e, 0x89)
interface ID3DXBuffer * LPD3DXBUFFER
Definition: d3dx8core.h:29
interface ID3DXEffect * LPD3DXEFFECT
Definition: d3dx8effect.h:74
HRESULT WINAPI D3DXCreateEffectFromResourceW(LPDIRECT3DDEVICE8 pDevice, HMODULE hSrcModule, LPCWSTR pSrcResource, LPD3DXEFFECT *ppEffect, LPD3DXBUFFER *ppCompilationErrors)
Definition: d3dx8effect.h:34
enum _D3DXPARAMETERTYPE D3DXPARAMETERTYPE
Definition: glslang_tab.cpp:136
Definition: d3dx8effect.h:60
Definition: glslang_tab.cpp:133
struct _D3DXTECHNIQUE_DESC D3DXTECHNIQUE_DESC
Definition: d3dx8effect.h:22
Definition: d3dx8effect.h:24
DECLARE_INTERFACE_(ID3DXEffect, IUnknown)
Definition: d3dx8effect.h:84