1 | /*
|
---|
2 | * Copyright 2008 Luis Busquets
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #include "d3dx9.h"
|
---|
29 |
|
---|
30 | #ifndef __D3DX9SHADER_H__
|
---|
31 | #define __D3DX9SHADER_H__
|
---|
32 |
|
---|
33 | #define D3DXSHADER_DEBUG 0x1
|
---|
34 | #define D3DXSHADER_SKIPVALIDATION 0x2
|
---|
35 | #define D3DXSHADER_SKIPOPTIMIZATION 0x4
|
---|
36 | #define D3DXSHADER_PACKMATRIX_ROWMAJOR 0x8
|
---|
37 | #define D3DXSHADER_PACKMATRIX_COLUMNMAJOR 0x10
|
---|
38 | #define D3DXSHADER_PARTIALPRECISION 0x20
|
---|
39 | #define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT 0x40
|
---|
40 | #define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT 0x80
|
---|
41 | #define D3DXSHADER_NO_PRESHADER 0x100
|
---|
42 | #define D3DXSHADER_AVOID_FLOW_CONTROL 0x200
|
---|
43 | #define D3DXSHADER_PREFER_FLOW_CONTROL 0x400
|
---|
44 | #define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
|
---|
45 | #define D3DXSHADER_IEEE_STRICTNESS 0x2000
|
---|
46 |
|
---|
47 | #define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
|
---|
48 | #define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
|
---|
49 | #define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
|
---|
50 | #define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
|
---|
51 |
|
---|
52 | #define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
|
---|
53 |
|
---|
54 | typedef const char *D3DXHANDLE;
|
---|
55 |
|
---|
56 | typedef enum _D3DXREGISTER_SET
|
---|
57 | {
|
---|
58 | D3DXRS_BOOL,
|
---|
59 | D3DXRS_INT4,
|
---|
60 | D3DXRS_FLOAT4,
|
---|
61 | D3DXRS_SAMPLER,
|
---|
62 | D3DXRS_FORCE_DWORD = 0x7fffffff
|
---|
63 | } D3DXREGISTER_SET, *LPD3DXREGISTER_SET;
|
---|
64 |
|
---|
65 | typedef enum D3DXPARAMETER_CLASS
|
---|
66 | {
|
---|
67 | D3DXPC_SCALAR,
|
---|
68 | D3DXPC_VECTOR,
|
---|
69 | D3DXPC_MATRIX_ROWS,
|
---|
70 | D3DXPC_MATRIX_COLUMNS,
|
---|
71 | D3DXPC_OBJECT,
|
---|
72 | D3DXPC_STRUCT,
|
---|
73 | D3DXPC_FORCE_DWORD = 0x7fffffff,
|
---|
74 | } D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS;
|
---|
75 |
|
---|
76 | typedef enum D3DXPARAMETER_TYPE
|
---|
77 | {
|
---|
78 | D3DXPT_VOID,
|
---|
79 | D3DXPT_BOOL,
|
---|
80 | D3DXPT_INT,
|
---|
81 | D3DXPT_FLOAT,
|
---|
82 | D3DXPT_STRING,
|
---|
83 | D3DXPT_TEXTURE,
|
---|
84 | D3DXPT_TEXTURE1D,
|
---|
85 | D3DXPT_TEXTURE2D,
|
---|
86 | D3DXPT_TEXTURE3D,
|
---|
87 | D3DXPT_TEXTURECUBE,
|
---|
88 | D3DXPT_SAMPLER,
|
---|
89 | D3DXPT_SAMPLER1D,
|
---|
90 | D3DXPT_SAMPLER2D,
|
---|
91 | D3DXPT_SAMPLER3D,
|
---|
92 | D3DXPT_SAMPLERCUBE,
|
---|
93 | D3DXPT_PIXELSHADER,
|
---|
94 | D3DXPT_VERTEXSHADER,
|
---|
95 | D3DXPT_PIXELFRAGMENT,
|
---|
96 | D3DXPT_VERTEXFRAGMENT,
|
---|
97 | D3DXPT_UNSUPPORTED,
|
---|
98 | D3DXPT_FORCE_DWORD = 0x7fffffff,
|
---|
99 | } D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE;
|
---|
100 |
|
---|
101 | typedef struct _D3DXCONSTANTTABLE_DESC
|
---|
102 | {
|
---|
103 | const char *Creator;
|
---|
104 | DWORD Version;
|
---|
105 | UINT Constants;
|
---|
106 | } D3DXCONSTANTTABLE_DESC, *LPD3DXCONSTANTTABLE_DESC;
|
---|
107 |
|
---|
108 | typedef struct _D3DXCONSTANT_DESC
|
---|
109 | {
|
---|
110 | const char *Name;
|
---|
111 | D3DXREGISTER_SET RegisterSet;
|
---|
112 | UINT RegisterIndex;
|
---|
113 | UINT RegisterCount;
|
---|
114 | D3DXPARAMETER_CLASS Class;
|
---|
115 | D3DXPARAMETER_TYPE Type;
|
---|
116 | UINT Rows;
|
---|
117 | UINT Columns;
|
---|
118 | UINT Elements;
|
---|
119 | UINT StructMembers;
|
---|
120 | UINT Bytes;
|
---|
121 | const void *DefaultValue;
|
---|
122 | } D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC;
|
---|
123 |
|
---|
124 | DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
|
---|
125 |
|
---|
126 | #undef INTERFACE
|
---|
127 | #define INTERFACE ID3DXConstantTable
|
---|
128 |
|
---|
129 | DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
|
---|
130 | {
|
---|
131 | /*** IUnknown methods ***/
|
---|
132 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
133 | STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
---|
134 | STDMETHOD_(ULONG, Release)(THIS) PURE;
|
---|
135 | /*** ID3DXBuffer methods ***/
|
---|
136 | STDMETHOD_(void *, GetBufferPointer)(THIS) PURE;
|
---|
137 | STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
|
---|
138 | /*** ID3DXConstantTable methods ***/
|
---|
139 | STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
|
---|
140 | STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
|
---|
141 | STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE;
|
---|
142 | STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
|
---|
143 | STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE constant, const char *name) PURE;
|
---|
144 | STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
|
---|
145 | STDMETHOD(SetDefaults)(THIS_ struct IDirect3DDevice9 *device) PURE;
|
---|
146 | STDMETHOD(SetValue)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
147 | const void *data, UINT data_size) PURE;
|
---|
148 | STDMETHOD(SetBool)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, BOOL value) PURE;
|
---|
149 | STDMETHOD(SetBoolArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
150 | const BOOL *values, UINT value_count) PURE;
|
---|
151 | STDMETHOD(SetInt)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, INT value) PURE;
|
---|
152 | STDMETHOD(SetIntArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
153 | const INT *values, UINT value_count) PURE;
|
---|
154 | STDMETHOD(SetFloat)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, float value) PURE;
|
---|
155 | STDMETHOD(SetFloatArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
156 | const float *values, UINT value_count) PURE;
|
---|
157 | STDMETHOD(SetVector)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXVECTOR4 *value) PURE;
|
---|
158 | STDMETHOD(SetVectorArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
159 | const D3DXVECTOR4 *values, UINT value_count) PURE;
|
---|
160 | STDMETHOD(SetMatrix)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *value) PURE;
|
---|
161 | STDMETHOD(SetMatrixArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
162 | const D3DXMATRIX *values, UINT value_count) PURE;
|
---|
163 | STDMETHOD(SetMatrixPointerArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
164 | const D3DXMATRIX **values, UINT value_count) PURE;
|
---|
165 | STDMETHOD(SetMatrixTranspose)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
166 | const D3DXMATRIX *value) PURE;
|
---|
167 | STDMETHOD(SetMatrixTransposeArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
168 | const D3DXMATRIX *values, UINT value_count) PURE;
|
---|
169 | STDMETHOD(SetMatrixTransposePointerArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
|
---|
170 | const D3DXMATRIX **values, UINT value_count) PURE;
|
---|
171 | };
|
---|
172 | #undef INTERFACE
|
---|
173 |
|
---|
174 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
175 | /*** IUnknown methods ***/
|
---|
176 | #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
177 | #define ID3DXConstantTable_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
178 | #define ID3DXConstantTable_Release(p) (p)->lpVtbl->Release(p)
|
---|
179 | /*** ID3DXBuffer methods ***/
|
---|
180 | #define ID3DXConstantTable_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
|
---|
181 | #define ID3DXConstantTable_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
|
---|
182 | /*** ID3DXConstantTable methods ***/
|
---|
183 | #define ID3DXConstantTable_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
|
---|
184 | #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->lpVtbl->GetConstantDesc(p,a,b,c)
|
---|
185 | #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->lpVtbl->GetSamplerIndex(p,a)
|
---|
186 | #define ID3DXConstantTable_GetConstant(p,a,b) (p)->lpVtbl->GetConstant(p,a,b)
|
---|
187 | #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->lpVtbl->GetConstantByName(p,a,b)
|
---|
188 | #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->lpVtbl->GetConstantElement(p,a,b)
|
---|
189 | #define ID3DXConstantTable_SetDefaults(p,a) (p)->lpVtbl->SetDefaults(p,a)
|
---|
190 | #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->lpVtbl->SetValue(p,a,b,c,d)
|
---|
191 | #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->lpVtbl->SetBool(p,a,b,c)
|
---|
192 | #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->lpVtbl->SetBoolArray(p,a,b,c,d)
|
---|
193 | #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->lpVtbl->SetInt(p,a,b,c)
|
---|
194 | #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->lpVtbl->SetIntArray(p,a,b,c,d)
|
---|
195 | #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->lpVtbl->SetFloat(p,a,b,c)
|
---|
196 | #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->lpVtbl->SetFloatArray(p,a,b,c,d)
|
---|
197 | #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->lpVtbl->SetVector(p,a,b,c)
|
---|
198 | #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->lpVtbl->SetVectorArray(p,a,b,c,d)
|
---|
199 | #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->lpVtbl->SetMatrix(p,a,b,c)
|
---|
200 | #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixArray(p,a,b,c,d)
|
---|
201 | #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixPointerArray(p,a,b,c,d)
|
---|
202 | #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->lpVtbl->SetMatrixTranspose(p,a,b,c)
|
---|
203 | #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposeArray(p,a,b,c,d)
|
---|
204 | #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposePointerArray(p,a,b,c,d)
|
---|
205 | #else
|
---|
206 | /*** IUnknown methods ***/
|
---|
207 | #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
---|
208 | #define ID3DXConstantTable_AddRef(p) (p)->AddRef()
|
---|
209 | #define ID3DXConstantTable_Release(p) (p)->Release()
|
---|
210 | /*** ID3DXBuffer methods ***/
|
---|
211 | #define ID3DXConstantTable_GetBufferPointer(p) (p)->GetBufferPointer()
|
---|
212 | #define ID3DXConstantTable_GetBufferSize(p) (p)->GetBufferSize()
|
---|
213 | /*** ID3DXConstantTable methods ***/
|
---|
214 | #define ID3DXConstantTable_GetDesc(p,a) (p)->GetDesc(a)
|
---|
215 | #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->GetConstantDesc(a,b,c)
|
---|
216 | #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->GetConstantDesc(a)
|
---|
217 | #define ID3DXConstantTable_GetConstant(p,a,b) (p)->GetConstant(a,b)
|
---|
218 | #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->GetConstantByName(a,b)
|
---|
219 | #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->GetConstantElement(a,b)
|
---|
220 | #define ID3DXConstantTable_SetDefaults(p,a) (p)->SetDefaults(a)
|
---|
221 | #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->SetValue(a,b,c,d)
|
---|
222 | #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->SetBool(a,b,c)
|
---|
223 | #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->SetBoolArray(a,b,c,d)
|
---|
224 | #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->SetInt(a,b,c)
|
---|
225 | #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->SetIntArray(a,b,c,d)
|
---|
226 | #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->SetFloat(a,b,c)
|
---|
227 | #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->SetFloatArray(a,b,c,d)
|
---|
228 | #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->SetVector(a,b,c)
|
---|
229 | #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->SetVectorArray(a,b,c,d)
|
---|
230 | #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->SetMatrix(a,b,c)
|
---|
231 | #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->SetMatrixArray(a,b,c,d)
|
---|
232 | #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->SetMatrixPointerArray(a,b,c,d)
|
---|
233 | #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->SetMatrixTranspose(a,b,c)
|
---|
234 | #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->SetMatrixTransposeArray(a,b,c,d)
|
---|
235 | #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->SetMatrixTransposePointerArray(a,b,c,d)
|
---|
236 | #endif
|
---|
237 |
|
---|
238 | typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
|
---|
239 |
|
---|
240 | typedef struct _D3DXMACRO
|
---|
241 | {
|
---|
242 | const char *Name;
|
---|
243 | const char *Definition;
|
---|
244 | } D3DXMACRO, *LPD3DXMACRO;
|
---|
245 |
|
---|
246 | typedef struct _D3DXSEMANTIC {
|
---|
247 | UINT Usage;
|
---|
248 | UINT UsageIndex;
|
---|
249 | } D3DXSEMANTIC, *LPD3DXSEMANTIC;
|
---|
250 |
|
---|
251 | typedef enum _D3DXINCLUDE_TYPE
|
---|
252 | {
|
---|
253 | D3DXINC_LOCAL,
|
---|
254 | D3DXINC_SYSTEM,
|
---|
255 | D3DXINC_FORCE_DWORD = 0x7fffffff,
|
---|
256 | } D3DXINCLUDE_TYPE, *LPD3DXINCLUDE_TYPE;
|
---|
257 |
|
---|
258 | #define INTERFACE ID3DXInclude
|
---|
259 |
|
---|
260 | DECLARE_INTERFACE(ID3DXInclude)
|
---|
261 | {
|
---|
262 | STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, const char *filename,
|
---|
263 | const void *parent_data, const void **data, UINT *bytes) PURE;
|
---|
264 | STDMETHOD(Close)(THIS_ const void *data) PURE;
|
---|
265 | };
|
---|
266 | #undef INTERFACE
|
---|
267 |
|
---|
268 | #define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
|
---|
269 | #define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
|
---|
270 |
|
---|
271 | typedef struct ID3DXInclude *LPD3DXINCLUDE;
|
---|
272 |
|
---|
273 | #ifdef __cplusplus
|
---|
274 | extern "C" {
|
---|
275 | #endif
|
---|
276 |
|
---|
277 | const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device);
|
---|
278 | UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
|
---|
279 | DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
|
---|
280 | const char * WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device);
|
---|
281 | HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size);
|
---|
282 | HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count);
|
---|
283 |
|
---|
284 | HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
---|
285 | ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
286 | HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
---|
287 | ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
288 | #define D3DXAssembleShaderFromFile WINELIB_NAME_AW(D3DXAssembleShaderFromFile)
|
---|
289 |
|
---|
290 | HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
---|
291 | ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
292 | HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
---|
293 | ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
294 | #define D3DXAssembleShaderFromResource WINELIB_NAME_AW(D3DXAssembleShaderFromResource)
|
---|
295 |
|
---|
296 | HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines,
|
---|
297 | ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
298 |
|
---|
299 | HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DXMACRO *defines,
|
---|
300 | ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags,
|
---|
301 | ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
---|
302 |
|
---|
303 | HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
---|
304 | ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
---|
305 | ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
---|
306 | HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
---|
307 | ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
---|
308 | ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
---|
309 | #define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
|
---|
310 |
|
---|
311 | HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
---|
312 | ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
---|
313 | ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
---|
314 | HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
---|
315 | ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
---|
316 | ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
---|
317 | #define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
|
---|
318 |
|
---|
319 | HRESULT WINAPI D3DXPreprocessShader(const char *data, UINT data_len, const D3DXMACRO *defines,
|
---|
320 | ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
321 |
|
---|
322 | HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
---|
323 | ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
324 | HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
---|
325 | ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
326 | #define D3DXPreprocessShaderFromFile WINELIB_NAME_AW(D3DXPreprocessShaderFromFile)
|
---|
327 |
|
---|
328 | HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
---|
329 | ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
330 | HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
---|
331 | ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
|
---|
332 | #define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
|
---|
333 |
|
---|
334 | HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table);
|
---|
335 |
|
---|
336 | HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table);
|
---|
337 |
|
---|
338 | #ifdef __cplusplus
|
---|
339 | }
|
---|
340 | #endif
|
---|
341 |
|
---|
342 | typedef struct _D3DXSHADER_CONSTANTTABLE
|
---|
343 | {
|
---|
344 | DWORD Size;
|
---|
345 | DWORD Creator;
|
---|
346 | DWORD Version;
|
---|
347 | DWORD Constants;
|
---|
348 | DWORD ConstantInfo;
|
---|
349 | DWORD Flags;
|
---|
350 | DWORD Target;
|
---|
351 | } D3DXSHADER_CONSTANTTABLE, *LPD3DXSHADER_CONSTANTTABLE;
|
---|
352 |
|
---|
353 | typedef struct _D3DXSHADER_CONSTANTINFO
|
---|
354 | {
|
---|
355 | DWORD Name;
|
---|
356 | WORD RegisterSet;
|
---|
357 | WORD RegisterIndex;
|
---|
358 | WORD RegisterCount;
|
---|
359 | WORD Reserved;
|
---|
360 | DWORD TypeInfo;
|
---|
361 | DWORD DefaultValue;
|
---|
362 | } D3DXSHADER_CONSTANTINFO, *LPD3DXSHADER_CONSTANTINFO;
|
---|
363 |
|
---|
364 | typedef struct _D3DXSHADER_TYPEINFO
|
---|
365 | {
|
---|
366 | WORD Class;
|
---|
367 | WORD Type;
|
---|
368 | WORD Rows;
|
---|
369 | WORD Columns;
|
---|
370 | WORD Elements;
|
---|
371 | WORD StructMembers;
|
---|
372 | DWORD StructMemberInfo;
|
---|
373 | } D3DXSHADER_TYPEINFO, *LPD3DXSHADER_TYPEINFO;
|
---|
374 |
|
---|
375 | typedef struct _D3DXSHADER_STRUCTMEMBERINFO
|
---|
376 | {
|
---|
377 | DWORD Name;
|
---|
378 | DWORD TypeInfo;
|
---|
379 | } D3DXSHADER_STRUCTMEMBERINFO, *LPD3DXSHADER_STRUCTMEMBERINFO;
|
---|
380 |
|
---|
381 | #endif /* __D3DX9SHADER_H__ */
|
---|