Mercurial > projects > ddbg_continued
comparison win32/directx/d3d10effect.d @ 1:4a9dcbd9e54f
-files of 0.13 beta
-fixes so that it now compiles with the current dmd version
author | marton@basel.hu |
---|---|
date | Tue, 05 Apr 2011 20:44:01 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:586e4a649642 | 1:4a9dcbd9e54f |
---|---|
1 /***********************************************************************\ | |
2 * d3d10effect.d * | |
3 * * | |
4 * Windows API header module * | |
5 * * | |
6 * Placed into public domain * | |
7 \***********************************************************************/ | |
8 module win32.directx.d3d10effect; | |
9 | |
10 private import win32.windows; | |
11 private import win32.directx.d3d10; | |
12 | |
13 // some forward references... | |
14 enum D3D10_SHADER_VARIABLE_CLASS; | |
15 enum D3D10_SHADER_VARIABLE_TYPE; | |
16 | |
17 enum D3D10_DEVICE_STATE_TYPES { | |
18 D3D10_DST_SO_BUFFERS = 1, | |
19 D3D10_DST_OM_RENDER_TARGETS, | |
20 D3D10_DST_OM_DEPTH_STENCIL_STATE, | |
21 D3D10_DST_OM_BLEND_STATE, | |
22 D3D10_DST_VS, | |
23 D3D10_DST_VS_SAMPLERS, | |
24 D3D10_DST_VS_SHADER_RESOURCES, | |
25 D3D10_DST_VS_CONSTANT_BUFFERS, | |
26 D3D10_DST_GS, | |
27 D3D10_DST_GS_SAMPLERS, | |
28 D3D10_DST_GS_SHADER_RESOURCES, | |
29 D3D10_DST_GS_CONSTANT_BUFFERS, | |
30 D3D10_DST_PS, | |
31 D3D10_DST_PS_SAMPLERS, | |
32 D3D10_DST_PS_SHADER_RESOURCES, | |
33 D3D10_DST_PS_CONSTANT_BUFFERS, | |
34 D3D10_DST_IA_VERTEX_BUFFERS, | |
35 D3D10_DST_IA_INDEX_BUFFER, | |
36 D3D10_DST_IA_INPUT_LAYOUT, | |
37 D3D10_DST_IA_PRIMITIVE_TOPOLOGY, | |
38 D3D10_DST_RS_VIEWPORTS, | |
39 D3D10_DST_RS_SCISSOR_RECTS, | |
40 D3D10_DST_RS_RASTERIZER_STATE, | |
41 D3D10_DST_PREDICATION | |
42 } | |
43 | |
44 struct D3D10_STATE_BLOCK_MASK { | |
45 BYTE VS; | |
46 BYTE[2] VSSamplers; | |
47 BYTE[16] VSShaderResources; | |
48 BYTE[2] VSConstantBuffers; | |
49 BYTE GS; | |
50 BYTE[2] GSSamplers; | |
51 BYTE[16] GSShaderResources; | |
52 BYTE[2] GSConstantBuffers; | |
53 BYTE PS; | |
54 BYTE[2] PSSamplers; | |
55 BYTE[16] PSShaderResources; | |
56 BYTE[2] PSConstantBuffers; | |
57 BYTE[2] IAVertexBuffers; | |
58 BYTE IAIndexBuffer; | |
59 BYTE IAInputLayout; | |
60 BYTE IAPrimitiveTopology; | |
61 BYTE OMRenderTargets; | |
62 BYTE OMDepthStencilState; | |
63 BYTE OMBlendState; | |
64 BYTE RSViewports; | |
65 BYTE RSScissorRects; | |
66 BYTE RSRasterizerState; | |
67 BYTE SOBuffers; | |
68 BYTE Predication; | |
69 } | |
70 | |
71 extern (C) const GUID IID_ID3D10StateBlock = {0x803425a, 0x57f5, 0x4dd6, [0x94, 0x65, 0xa8, 0x75, 0x70, 0x83, 0x4a, 0x08]}; | |
72 | |
73 interface ID3D10StateBlock : IUnknown { | |
74 extern(Windows) : | |
75 HRESULT Capture(); | |
76 HRESULT Apply(); | |
77 HRESULT ReleaseAllDeviceObjects(); | |
78 HRESULT GetDevice(ID3D10Device ppDevice); | |
79 } | |
80 | |
81 HRESULT D3D10StateBlockMaskUnion(D3D10_STATE_BLOCK_MASK* pA, D3D10_STATE_BLOCK_MASK* pB, D3D10_STATE_BLOCK_MASK* pResult); | |
82 HRESULT D3D10StateBlockMaskIntersect(D3D10_STATE_BLOCK_MASK* pA, D3D10_STATE_BLOCK_MASK* pB, D3D10_STATE_BLOCK_MASK* pResult); | |
83 HRESULT D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK* pA, D3D10_STATE_BLOCK_MASK* pB, D3D10_STATE_BLOCK_MASK* pResult); | |
84 HRESULT D3D10StateBlockMaskEnableCapture(D3D10_STATE_BLOCK_MASK* pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength); | |
85 HRESULT D3D10StateBlockMaskDisableCapture(D3D10_STATE_BLOCK_MASK* pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength); | |
86 HRESULT D3D10StateBlockMaskEnableAll(D3D10_STATE_BLOCK_MASK* pMask); | |
87 HRESULT D3D10StateBlockMaskDisableAll(D3D10_STATE_BLOCK_MASK* pMask); | |
88 BOOL D3D10StateBlockMaskGetSetting(D3D10_STATE_BLOCK_MASK* pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT Entry); | |
89 HRESULT D3D10CreateStateBlock(ID3D10Device pDevice, D3D10_STATE_BLOCK_MASK* pStateBlockMask, ID3D10StateBlock ppStateBlock); | |
90 | |
91 const D3D10_EFFECT_COMPILE_CHILD_EFFECT = 1 << 0; | |
92 const D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS = 1 << 1; | |
93 const D3D10_EFFECT_SINGLE_THREADED = 1 << 3; | |
94 const D3D10_EFFECT_VARIABLE_POOLED = 1 << 0; | |
95 const D3D10_EFFECT_VARIABLE_ANNOTATION = 1 << 1; | |
96 const D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT = 1 << 2; | |
97 | |
98 struct D3D10_EFFECT_TYPE_DESC { | |
99 LPCSTR TypeName; | |
100 D3D10_SHADER_VARIABLE_CLASS Class; | |
101 D3D10_SHADER_VARIABLE_TYPE Type; | |
102 UINT Elements; | |
103 UINT Members; | |
104 UINT Rows; | |
105 UINT Columns; | |
106 UINT PackedSize; | |
107 UINT UnpackedSize; | |
108 UINT Stride; | |
109 } | |
110 | |
111 extern (C) const GUID IID_ID3D10EffectType = {0x4e9e1ddc, 0xcd9d, 0x4772, [0xa8, 0x37, 0x0, 0x18, 0x0b, 0x9b, 0x88, 0xfd]}; | |
112 | |
113 interface ID3D10EffectType { | |
114 /* TODO: fix vtbl[0] bug | |
115 extern(Windows) : | |
116 BOOL IsValid(); | |
117 HRESULT GetDesc(D3D10_EFFECT_TYPE_DESC* pDesc); | |
118 ID3D10EffectType GetMemberTypeByIndex(UINT Index); | |
119 ID3D10EffectType GetMemberTypeByName(LPCSTR Name); | |
120 ID3D10EffectType GetMemberTypeBySemantic(LPCSTR Semantic); | |
121 LPCSTR GetMemberName(UINT Index); | |
122 LPCSTR GetMemberSemantic(UINT Index); | |
123 */ | |
124 } | |
125 | |
126 struct D3D10_EFFECT_VARIABLE_DESC { | |
127 LPCSTR Name; | |
128 LPCSTR Semantic; | |
129 UINT Flags; | |
130 UINT Annotations; | |
131 UINT BufferOffset; | |
132 UINT ExplicitBindPoint; | |
133 } | |
134 | |
135 extern (C) const GUID IID_ID3D10EffectVariable = {0xae897105, 0x00e6, 0x45bf, [0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b]}; | |
136 | |
137 interface ID3D10EffectVariable { | |
138 /* TODO: fix vtbl[0] bug | |
139 extern(Windows) : | |
140 BOOL IsValid(); | |
141 ID3D10EffectType GetType(); | |
142 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
143 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
144 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
145 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
146 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
147 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
148 ID3D10EffectVariable GetElement(UINT Index); | |
149 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
150 ID3D10EffectScalarVariable AsScalar(); | |
151 ID3D10EffectVectorVariable AsVector(); | |
152 ID3D10EffectMatrixVariable AsMatrix(); | |
153 ID3D10EffectStringVariable AsString(); | |
154 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
155 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
156 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
157 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
158 ID3D10EffectShaderVariable AsShader(); | |
159 ID3D10EffectBlendVariable AsBlend(); | |
160 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
161 ID3D10EffectRasterizerVariable AsRasterizer(); | |
162 ID3D10EffectSamplerVariable AsSampler(); | |
163 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
164 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
165 */ | |
166 } | |
167 | |
168 extern (C) const GUID IID_ID3D10EffectScalarVariable = {0xe48f7b, 0xd2c8, 0x49e8, [0xa8, 0x6c, 0x2, 0x2d, 0xee, 0x53, 0x43, 0x1f]}; | |
169 | |
170 interface ID3D10EffectScalarVariable : ID3D10EffectVariable { | |
171 /* TODO: fix vtbl[0] bug | |
172 extern(Windows) : | |
173 BOOL IsValid(); | |
174 ID3D10EffectType GetType(); | |
175 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
176 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
177 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
178 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
179 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
180 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
181 ID3D10EffectVariable GetElement(UINT Index); | |
182 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
183 ID3D10EffectScalarVariable AsScalar(); | |
184 ID3D10EffectVectorVariable AsVector(); | |
185 ID3D10EffectMatrixVariable AsMatrix(); | |
186 ID3D10EffectStringVariable AsString(); | |
187 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
188 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
189 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
190 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
191 ID3D10EffectShaderVariable AsShader(); | |
192 ID3D10EffectBlendVariable AsBlend(); | |
193 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
194 ID3D10EffectRasterizerVariable AsRasterizer(); | |
195 ID3D10EffectSamplerVariable AsSampler(); | |
196 HRESULT SetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
197 HRESULT GetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
198 HRESULT SetFloat(float Value); | |
199 HRESULT GetFloat(float* pValue); | |
200 HRESULT SetFloatArray(float* pData, UINT Offset, UINT Count); | |
201 HRESULT GetFloatArray(float* pData, UINT Offset, UINT Count); | |
202 HRESULT SetInt(int Value); | |
203 HRESULT GetInt(int* pValue); | |
204 HRESULT SetIntArray(int* pData, UINT Offset, UINT Count); | |
205 HRESULT GetIntArray(int* pData, UINT Offset, UINT Count); | |
206 HRESULT SetBool(BOOL Value); | |
207 HRESULT GetBool(BOOL* pValue); | |
208 HRESULT SetBoolArray(BOOL* pData, UINT Offset, UINT Count); | |
209 HRESULT GetBoolArray(BOOL* pData, UINT Offset, UINT Count); | |
210 */ | |
211 } | |
212 | |
213 extern (C) const GUID IID_ID3D10EffectVectorVariable = {0x62b98c44, 0x1f82, 0x4c67, [0xbc, 0xd0, 0x72, 0xcf, 0x8f, 0x21, 0x7e, 0x81]}; | |
214 | |
215 interface ID3D10EffectVectorVariable : ID3D10EffectVariable { | |
216 /* TODO: fix vtbl[0] bug | |
217 extern(Windows) : | |
218 BOOL IsValid(); | |
219 ID3D10EffectType GetType(); | |
220 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
221 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
222 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
223 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
224 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
225 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
226 ID3D10EffectVariable GetElement(UINT Index); | |
227 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
228 ID3D10EffectScalarVariable AsScalar(); | |
229 ID3D10EffectVectorVariable AsVector(); | |
230 ID3D10EffectMatrixVariable AsMatrix(); | |
231 ID3D10EffectStringVariable AsString(); | |
232 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
233 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
234 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
235 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
236 ID3D10EffectShaderVariable AsShader(); | |
237 ID3D10EffectBlendVariable AsBlend(); | |
238 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
239 ID3D10EffectRasterizerVariable AsRasterizer(); | |
240 ID3D10EffectSamplerVariable AsSampler(); | |
241 HRESULT SetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
242 HRESULT GetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
243 HRESULT SetBoolVector (BOOL* pData); | |
244 HRESULT SetIntVector (int* pData); | |
245 HRESULT SetFloatVector(float* pData); | |
246 HRESULT GetBoolVector (BOOL* pData); | |
247 HRESULT GetIntVector (int* pData); | |
248 HRESULT GetFloatVector(float* pData); | |
249 HRESULT SetBoolVectorArray (BOOL* pData, UINT Offset, UINT Count); | |
250 HRESULT SetIntVectorArray (int* pData, UINT Offset, UINT Count); | |
251 HRESULT SetFloatVectorArray(float* pData, UINT Offset, UINT Count); | |
252 HRESULT GetBoolVectorArray (BOOL* pData, UINT Offset, UINT Count); | |
253 HRESULT GetIntVectorArray (int* pData, UINT Offset, UINT Count); | |
254 HRESULT GetFloatVectorArray(float* pData, UINT Offset, UINT Count); | |
255 */ | |
256 } | |
257 | |
258 extern (C) const GUID IID_ID3D10EffectMatrixVariable = {0x50666c24, 0xb82f, 0x4eed, [0xa1, 0x72, 0x5b, 0x6e, 0x7e, 0x85, 0x22, 0xe0]}; | |
259 | |
260 interface ID3D10EffectMatrixVariable : ID3D10EffectVariable { | |
261 /* TODO: fix vtbl[0] bug | |
262 extern(Windows) : | |
263 BOOL IsValid(); | |
264 ID3D10EffectType GetType(); | |
265 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
266 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
267 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
268 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
269 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
270 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
271 ID3D10EffectVariable GetElement(UINT Index); | |
272 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
273 ID3D10EffectScalarVariable AsScalar(); | |
274 ID3D10EffectVectorVariable AsVector(); | |
275 ID3D10EffectMatrixVariable AsMatrix(); | |
276 ID3D10EffectStringVariable AsString(); | |
277 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
278 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
279 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
280 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
281 ID3D10EffectShaderVariable AsShader(); | |
282 ID3D10EffectBlendVariable AsBlend(); | |
283 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
284 ID3D10EffectRasterizerVariable AsRasterizer(); | |
285 ID3D10EffectSamplerVariable AsSampler(); | |
286 HRESULT SetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
287 HRESULT GetRawValue(void* pData, UINT ByteOffset, UINT ByteCount); | |
288 HRESULT SetMatrix(float* pData); | |
289 HRESULT GetMatrix(float* pData); | |
290 HRESULT SetMatrixArray(float* pData, UINT Offset, UINT Count); | |
291 HRESULT GetMatrixArray(float* pData, UINT Offset, UINT Count); | |
292 HRESULT SetMatrixTranspose(float* pData); | |
293 HRESULT GetMatrixTranspose(float* pData); | |
294 HRESULT SetMatrixTransposeArray(float* pData, UINT Offset, UINT Count); | |
295 HRESULT GetMatrixTransposeArray(float* pData, UINT Offset, UINT Count); | |
296 */ | |
297 } | |
298 | |
299 extern (C) const GUID IID_ID3D10EffectStringVariable = {0x71417501, 0x8df9, 0x4e0a, [0xa7, 0x8a, 0x25, 0x5f, 0x97, 0x56, 0xba, 0xff]}; | |
300 | |
301 interface ID3D10EffectStringVariable : ID3D10EffectVariable { | |
302 /* TODO: fix vtbl[0] bug | |
303 extern(Windows) : | |
304 BOOL IsValid(); | |
305 ID3D10EffectType GetType(); | |
306 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
307 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
308 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
309 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
310 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
311 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
312 ID3D10EffectVariable GetElement(UINT Index); | |
313 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
314 ID3D10EffectScalarVariable AsScalar(); | |
315 ID3D10EffectVectorVariable AsVector(); | |
316 ID3D10EffectMatrixVariable AsMatrix(); | |
317 ID3D10EffectStringVariable AsString(); | |
318 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
319 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
320 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
321 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
322 ID3D10EffectShaderVariable AsShader(); | |
323 ID3D10EffectBlendVariable AsBlend(); | |
324 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
325 ID3D10EffectRasterizerVariable AsRasterizer(); | |
326 ID3D10EffectSamplerVariable AsSampler(); | |
327 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
328 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
329 HRESULT GetString(LPCSTR* ppString); | |
330 HRESULT GetStringArray(LPCSTR* ppStrings, UINT Offset, UINT Count); | |
331 */ | |
332 } | |
333 | |
334 extern (C) const GUID IID_ID3D10EffectShaderResourceVariable = {0xc0a7157b, 0xd872, 0x4b1d, [0x80, 0x73, 0xef, 0xc2, 0xac, 0xd4, 0xb1, 0xfc]}; | |
335 | |
336 interface ID3D10EffectShaderResourceVariable : ID3D10EffectVariable { | |
337 /* TODO: fix vtbl[0] bug | |
338 extern(Windows) : | |
339 BOOL IsValid(); | |
340 ID3D10EffectType GetType(); | |
341 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
342 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
343 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
344 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
345 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
346 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
347 ID3D10EffectVariable GetElement(UINT Index); | |
348 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
349 ID3D10EffectScalarVariable AsScalar(); | |
350 ID3D10EffectVectorVariable AsVector(); | |
351 ID3D10EffectMatrixVariable AsMatrix(); | |
352 ID3D10EffectStringVariable AsString(); | |
353 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
354 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
355 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
356 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
357 ID3D10EffectShaderVariable AsShader(); | |
358 ID3D10EffectBlendVariable AsBlend(); | |
359 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
360 ID3D10EffectRasterizerVariable AsRasterizer(); | |
361 ID3D10EffectSamplerVariable AsSampler(); | |
362 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
363 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
364 HRESULT SetResource(ID3D10ShaderResourceView pResource); | |
365 HRESULT GetResource(ID3D10ShaderResourceView* ppResource); | |
366 HRESULT SetResourceArray(ID3D10ShaderResourceView* ppResources, UINT Offset, UINT Count); | |
367 HRESULT GetResourceArray(ID3D10ShaderResourceView* ppResources, UINT Offset, UINT Count); | |
368 */ | |
369 } | |
370 | |
371 extern (C) const GUID IID_ID3D10EffectRenderTargetViewVariable = {0x28ca0cc3, 0xc2c9, 0x40bb, [0xb5, 0x7f, 0x67, 0xb7, 0x37, 0x12, 0x2b, 0x17]}; | |
372 | |
373 interface ID3D10EffectRenderTargetViewVariable : ID3D10EffectVariable { | |
374 /* TODO: fix vtbl[0] bug | |
375 extern(Windows) : | |
376 BOOL IsValid(); | |
377 ID3D10EffectType GetType(); | |
378 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
379 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
380 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
381 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
382 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
383 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
384 ID3D10EffectVariable GetElement(UINT Index); | |
385 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
386 ID3D10EffectScalarVariable AsScalar(); | |
387 ID3D10EffectVectorVariable AsVector(); | |
388 ID3D10EffectMatrixVariable AsMatrix(); | |
389 ID3D10EffectStringVariable AsString(); | |
390 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
391 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
392 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
393 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
394 ID3D10EffectShaderVariable AsShader(); | |
395 ID3D10EffectBlendVariable AsBlend(); | |
396 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
397 ID3D10EffectRasterizerVariable AsRasterizer(); | |
398 ID3D10EffectSamplerVariable AsSampler(); | |
399 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
400 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
401 HRESULT SetRenderTarget(ID3D10RenderTargetView pResource); | |
402 HRESULT GetRenderTarget(ID3D10RenderTargetView* ppResource); | |
403 HRESULT SetRenderTargetArray(ID3D10RenderTargetView* ppResources, UINT Offset, UINT Count); | |
404 HRESULT GetRenderTargetArray(ID3D10RenderTargetView* ppResources, UINT Offset, UINT Count); | |
405 */ | |
406 } | |
407 | |
408 extern (C) const GUID IID_ID3D10EffectDepthStencilViewVariable = {0x3e02c918, 0xcc79, 0x4985, [0xb6, 0x22, 0x2d, 0x92, 0xad, 0x70, 0x16, 0x23]}; | |
409 | |
410 interface ID3D10EffectDepthStencilViewVariable : ID3D10EffectVariable { | |
411 /* TODO: fix vtbl[0] bug | |
412 extern(Windows) : | |
413 BOOL IsValid(); | |
414 ID3D10EffectType GetType(); | |
415 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
416 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
417 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
418 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
419 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
420 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
421 ID3D10EffectVariable GetElement(UINT Index); | |
422 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
423 ID3D10EffectScalarVariable AsScalar(); | |
424 ID3D10EffectVectorVariable AsVector(); | |
425 ID3D10EffectMatrixVariable AsMatrix(); | |
426 ID3D10EffectStringVariable AsString(); | |
427 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
428 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
429 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
430 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
431 ID3D10EffectShaderVariable AsShader(); | |
432 ID3D10EffectBlendVariable AsBlend(); | |
433 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
434 ID3D10EffectRasterizerVariable AsRasterizer(); | |
435 ID3D10EffectSamplerVariable AsSampler(); | |
436 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
437 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
438 HRESULT SetDepthStencil(ID3D10DepthStencilView pResource); | |
439 HRESULT GetDepthStencil(ID3D10DepthStencilView* ppResource); | |
440 HRESULT SetDepthStencilArray(ID3D10DepthStencilView* ppResources, UINT Offset, UINT Count); | |
441 HRESULT GetDepthStencilArray(ID3D10DepthStencilView* ppResources, UINT Offset, UINT Count); | |
442 */ | |
443 } | |
444 | |
445 extern (C) const GUID IID_ID3D10EffectConstantBuffer = {0x56648f4d, 0xcc8b, 0x4444, [0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3]}; | |
446 | |
447 interface ID3D10EffectConstantBuffer : ID3D10EffectVariable { | |
448 /* TODO: fix vtbl[0] bug | |
449 extern(Windows) : | |
450 ID3D10EffectType GetType(); | |
451 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
452 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
453 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
454 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
455 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
456 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
457 ID3D10EffectVariable GetElement(UINT Index); | |
458 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
459 ID3D10EffectScalarVariable AsScalar(); | |
460 ID3D10EffectVectorVariable AsVector(); | |
461 ID3D10EffectMatrixVariable AsMatrix(); | |
462 ID3D10EffectStringVariable AsString(); | |
463 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
464 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
465 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
466 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
467 ID3D10EffectShaderVariable AsShader(); | |
468 ID3D10EffectBlendVariable AsBlend(); | |
469 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
470 ID3D10EffectRasterizerVariable AsRasterizer(); | |
471 ID3D10EffectSamplerVariable AsSampler(); | |
472 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
473 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
474 HRESULT SetConstantBuffer(ID3D10Buffer pConstantBuffer); | |
475 HRESULT GetConstantBuffer(ID3D10Buffer* ppConstantBuffer); | |
476 HRESULT SetTextureBuffer(ID3D10ShaderResourceView pTextureBuffer); | |
477 HRESULT GetTextureBuffer(ID3D10ShaderResourceView* ppTextureBuffer); | |
478 */ | |
479 } | |
480 | |
481 struct D3D10_EFFECT_SHADER_DESC { | |
482 BYTE* pInputSignature; | |
483 BOOL IsInline; | |
484 BYTE* pBytecode; | |
485 UINT BytecodeLength; | |
486 LPCSTR SODecl; | |
487 UINT NumInputSignatureEntries; | |
488 UINT NumOutputSignatureEntries; | |
489 } | |
490 | |
491 extern (C) const GUID IID_ID3D10EffectShaderVariable = {0x80849279, 0xc799, 0x4797, [0x8c, 0x33, 0x4, 0x7, 0xa0, 0x7d, 0x9e, 0x6]}; | |
492 | |
493 interface ID3D10EffectShaderVariable : ID3D10EffectVariable { | |
494 /* TODO: fix vtbl[0] bug | |
495 extern(Windows) : | |
496 ID3D10EffectType GetType(); | |
497 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
498 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
499 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
500 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
501 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
502 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
503 ID3D10EffectVariable GetElement(UINT Index); | |
504 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
505 ID3D10EffectScalarVariable AsScalar(); | |
506 ID3D10EffectVectorVariable AsVector(); | |
507 ID3D10EffectMatrixVariable AsMatrix(); | |
508 ID3D10EffectStringVariable AsString(); | |
509 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
510 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
511 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
512 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
513 ID3D10EffectShaderVariable AsShader(); | |
514 ID3D10EffectBlendVariable AsBlend(); | |
515 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
516 ID3D10EffectRasterizerVariable AsRasterizer(); | |
517 ID3D10EffectSamplerVariable AsSampler(); | |
518 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
519 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
520 HRESULT GetShaderDesc(UINT ShaderIndex, D3D10_EFFECT_SHADER_DESC* pDesc); | |
521 HRESULT GetVertexShader(UINT ShaderIndex, ID3D10VertexShader* ppVS); | |
522 HRESULT GetGeometryShader(UINT ShaderIndex, ID3D10GeometryShader* ppGS); | |
523 HRESULT GetPixelShader(UINT ShaderIndex, ID3D10PixelShader* ppPS); | |
524 HRESULT GetInputSignatureElementDesc(UINT ShaderIndex, UINT Element, D3D10_SIGNATURE_PARAMETER_DESC* pDesc); | |
525 HRESULT GetOutputSignatureElementDesc(UINT ShaderIndex, UINT Element, D3D10_SIGNATURE_PARAMETER_DESC* pDesc); | |
526 */ | |
527 } | |
528 | |
529 extern (C) const GUID IID_ID3D10EffectBlendVariable = {0x1fcd2294, 0xdf6d, 0x4eae, [0x86, 0xb3, 0xe, 0x91, 0x60, 0xcf, 0xb0, 0x7b]}; | |
530 | |
531 interface ID3D10EffectBlendVariable : ID3D10EffectVariable { | |
532 /* TODO: fix vtbl[0] bug | |
533 extern(Windows) : | |
534 ID3D10EffectType GetType(); | |
535 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
536 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
537 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
538 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
539 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
540 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
541 ID3D10EffectVariable GetElement(UINT Index); | |
542 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
543 ID3D10EffectScalarVariable AsScalar(); | |
544 ID3D10EffectVectorVariable AsVector(); | |
545 ID3D10EffectMatrixVariable AsMatrix(); | |
546 ID3D10EffectStringVariable AsString(); | |
547 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
548 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
549 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
550 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
551 ID3D10EffectShaderVariable AsShader(); | |
552 ID3D10EffectBlendVariable AsBlend(); | |
553 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
554 ID3D10EffectRasterizerVariable AsRasterizer(); | |
555 ID3D10EffectSamplerVariable AsSampler(); | |
556 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
557 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
558 HRESULT GetBlendState(UINT Index, ID3D10BlendState* ppBlendState); | |
559 HRESULT GetBackingStore(UINT Index, D3D10_BLEND_DESC* pBlendDesc); | |
560 */ | |
561 } | |
562 | |
563 extern (C) const GUID IID_ID3D10EffectDepthStencilVariable = {0xaf482368, 0x330a, 0x46a5, [0x9a, 0x5c, 0x1, 0xc7, 0x1a, 0xf2, 0x4c, 0x8d]}; | |
564 | |
565 interface ID3D10EffectDepthStencilVariable : ID3D10EffectVariable { | |
566 /* TODO: fix vtbl[0] bug | |
567 extern(Windows) : | |
568 ID3D10EffectType GetType(); | |
569 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
570 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
571 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
572 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
573 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
574 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
575 ID3D10EffectVariable GetElement(UINT Index); | |
576 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
577 ID3D10EffectScalarVariable AsScalar(); | |
578 ID3D10EffectVectorVariable AsVector(); | |
579 ID3D10EffectMatrixVariable AsMatrix(); | |
580 ID3D10EffectStringVariable AsString(); | |
581 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
582 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
583 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
584 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
585 ID3D10EffectShaderVariable AsShader(); | |
586 ID3D10EffectBlendVariable AsBlend(); | |
587 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
588 ID3D10EffectRasterizerVariable AsRasterizer(); | |
589 ID3D10EffectSamplerVariable AsSampler(); | |
590 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
591 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
592 HRESULT GetDepthStencilState(UINT Index, ID3D10DepthStencilState* ppDepthStencilState); | |
593 HRESULT GetBackingStore(UINT Index, D3D10_DEPTH_STENCIL_DESC* pDepthStencilDesc); | |
594 */ | |
595 } | |
596 | |
597 extern (C) const GUID IID_ID3D10EffectRasterizerVariable = {0x21af9f0e, 0x4d94, 0x4ea9, [0x97, 0x85, 0x2c, 0xb7, 0x6b, 0x8c, 0xb, 0x34]}; | |
598 | |
599 interface ID3D10EffectRasterizerVariable : ID3D10EffectVariable { | |
600 /* TODO: fix vtbl[0] bug | |
601 extern(Windows) : | |
602 ID3D10EffectType GetType(); | |
603 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
604 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
605 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
606 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
607 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
608 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
609 ID3D10EffectVariable GetElement(UINT Index); | |
610 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
611 ID3D10EffectScalarVariable AsScalar(); | |
612 ID3D10EffectVectorVariable AsVector(); | |
613 ID3D10EffectMatrixVariable AsMatrix(); | |
614 ID3D10EffectStringVariable AsString(); | |
615 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
616 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
617 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
618 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
619 ID3D10EffectShaderVariable AsShader(); | |
620 ID3D10EffectBlendVariable AsBlend(); | |
621 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
622 ID3D10EffectRasterizerVariable AsRasterizer(); | |
623 ID3D10EffectSamplerVariable AsSampler(); | |
624 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
625 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
626 HRESULT GetRasterizerState(UINT Index, ID3D10RasterizerState* ppRasterizerState); | |
627 HRESULT GetBackingStore(UINT Index, D3D10_RASTERIZER_DESC* pRasterizerDesc); | |
628 */ | |
629 } | |
630 | |
631 extern (C) const GUID IID_ID3D10EffectSamplerVariable = {0x6530d5c7, 0x07e9, 0x4271, [0xa4, 0x18, 0xe7, 0xce, 0x4b, 0xd1, 0xe4, 0x80]}; | |
632 | |
633 interface ID3D10EffectSamplerVariable : ID3D10EffectVariable { | |
634 /* TODO: fix vtbl[0] bug | |
635 extern(Windows) : | |
636 ID3D10EffectType GetType(); | |
637 HRESULT GetDesc(D3D10_EFFECT_VARIABLE_DESC* pDesc); | |
638 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
639 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
640 ID3D10EffectVariable GetMemberByIndex(UINT Index); | |
641 ID3D10EffectVariable GetMemberByName(LPCSTR Name); | |
642 ID3D10EffectVariable GetMemberBySemantic(LPCSTR Semantic); | |
643 ID3D10EffectVariable GetElement(UINT Index); | |
644 ID3D10EffectConstantBuffer GetParentConstantBuffer(); | |
645 ID3D10EffectScalarVariable AsScalar(); | |
646 ID3D10EffectVectorVariable AsVector(); | |
647 ID3D10EffectMatrixVariable AsMatrix(); | |
648 ID3D10EffectStringVariable AsString(); | |
649 ID3D10EffectShaderResourceVariable AsShaderResource(); | |
650 ID3D10EffectRenderTargetViewVariable AsRenderTargetView(); | |
651 ID3D10EffectDepthStencilViewVariable AsDepthStencilView(); | |
652 ID3D10EffectConstantBuffer AsConstantBuffer(); | |
653 ID3D10EffectShaderVariable AsShader(); | |
654 ID3D10EffectBlendVariable AsBlend(); | |
655 ID3D10EffectDepthStencilVariable AsDepthStencil(); | |
656 ID3D10EffectRasterizerVariable AsRasterizer(); | |
657 ID3D10EffectSamplerVariable AsSampler(); | |
658 HRESULT SetRawValue(void* pData, UINT Offset, UINT Count); | |
659 HRESULT GetRawValue(void* pData, UINT Offset, UINT Count); | |
660 HRESULT GetSampler(UINT Index, ID3D10SamplerState* ppSampler); | |
661 HRESULT GetBackingStore(UINT Index, D3D10_SAMPLER_DESC* pSamplerDesc); | |
662 */ | |
663 } | |
664 | |
665 struct D3D10_PASS_DESC { | |
666 LPCSTR Name; | |
667 UINT Annotations; | |
668 BYTE* pIAInputSignature; | |
669 SIZE_T IAInputSignatureSize; | |
670 UINT StencilRef; | |
671 UINT SampleMask; | |
672 FLOAT[4] BlendFactor; | |
673 } | |
674 | |
675 struct D3D10_PASS_SHADER_DESC { | |
676 ID3D10EffectShaderVariable pShaderVariable; | |
677 UINT ShaderIndex; | |
678 } | |
679 | |
680 extern (C) const GUID IID_ID3D10EffectPass = {0x5cfbeb89, 0x1a06, 0x46e0, [0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54]}; | |
681 | |
682 /+interface ID3D10EffectPass { | |
683 /* TODO: fix vtbl[0] bug | |
684 extern(Windows) : | |
685 BOOL IsValid(); | |
686 HRESULT GetDesc(D3D10_PASS_DESC* pDesc); | |
687 HRESULT GetVertexShaderDesc(D3D10_PASS_SHADER_DESC* pDesc); | |
688 HRESULT GetGeometryShaderDesc(D3D10_PASS_SHADER_DESC* pDesc); | |
689 HRESULT GetPixelShaderDesc(D3D10_PASS_SHADER_DESC* pDesc); | |
690 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
691 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
692 HRESULT Apply(UINT Flags); | |
693 HRESULT ComputeStateBlockMask(D3D10_STATE_BLOCK_MASK* pStateBlockMask); | |
694 */ | |
695 }+/ | |
696 /** | |
697 * HACK to FIX vtbl[0] bug: | |
698 * This is an example HACK how to fix all interfaces which are NOT derived from | |
699 * IUnknown. They need the first entry in their vtbl[] point to the first | |
700 * virtual function. | |
701 * See: | |
702 * http://www.digitalmars.com/d/cpp_interface.html | |
703 * http://d.puremagic.com/issues/show_bug.cgi?id=1687 | |
704 */ | |
705 struct ID3D10EffectPassVtbl { | |
706 extern(Windows) : | |
707 BOOL function(ID3D10EffectPass) IsValid; | |
708 HRESULT function(ID3D10EffectPass, D3D10_PASS_DESC* pDesc) GetDesc; | |
709 HRESULT function(ID3D10EffectPass, D3D10_PASS_SHADER_DESC* pDesc) GetVertexShaderDesc; | |
710 HRESULT function(ID3D10EffectPass, D3D10_PASS_SHADER_DESC* pDesc) GetGeometryShaderDesc; | |
711 HRESULT function(ID3D10EffectPass, D3D10_PASS_SHADER_DESC* pDesc) GetPixelShaderDesc; | |
712 ID3D10EffectVariable function(ID3D10EffectPass, UINT Index) GetAnnotationByIndex; | |
713 ID3D10EffectVariable function(ID3D10EffectPass, LPCSTR Name) GetAnnotationByName; | |
714 HRESULT function(ID3D10EffectPass, UINT Flags) Apply; | |
715 HRESULT function(ID3D10EffectPass, D3D10_STATE_BLOCK_MASK* pStateBlockMask) ComputeStateBlockMask; | |
716 } | |
717 alias ID3D10EffectPassVtbl** ID3D10EffectPass; | |
718 | |
719 struct D3D10_TECHNIQUE_DESC { | |
720 LPCSTR Name; | |
721 UINT Passes; | |
722 UINT Annotations; | |
723 } | |
724 | |
725 extern (C) const GUID IID_ID3D10EffectTechnique = {0xdb122ce8, 0xd1c9, 0x4292, [0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75]}; | |
726 | |
727 /+interface ID3D10EffectTechnique { | |
728 /* TODO: fix vtbl[0] bug | |
729 extern(Windows) : | |
730 BOOL IsValid(); | |
731 HRESULT GetDesc(D3D10_TECHNIQUE_DESC* pDesc); | |
732 ID3D10EffectVariable GetAnnotationByIndex(UINT Index); | |
733 ID3D10EffectVariable GetAnnotationByName(LPCSTR Name); | |
734 ID3D10EffectPass GetPassByIndex(UINT Index); | |
735 ID3D10EffectPass GetPassByName(LPCSTR Name); | |
736 HRESULT ComputeStateBlockMask(D3D10_STATE_BLOCK_MASK* pStateBlockMask); | |
737 */ | |
738 }+/ | |
739 /** | |
740 * HACK to FIX vtbl[0] bug: | |
741 * This is an example HACK how to fix all interfaces which are NOT derived from | |
742 * IUnknown. They need the first entry in their vtbl[] point to the first | |
743 * virtual function. | |
744 * See: | |
745 * http://www.digitalmars.com/d/cpp_interface.html | |
746 * http://d.puremagic.com/issues/show_bug.cgi?id=1687 | |
747 */ | |
748 struct ID3D10EffectTechniqueVtbl { | |
749 extern(Windows) : | |
750 BOOL function(ID3D10EffectTechnique) IsValid; | |
751 HRESULT function(ID3D10EffectTechnique, D3D10_TECHNIQUE_DESC* pDesc) GetDesc; | |
752 ID3D10EffectVariable function(ID3D10EffectTechnique, UINT Index) GetAnnotationByIndex; | |
753 ID3D10EffectVariable function(ID3D10EffectTechnique, LPCSTR Name) GetAnnotationByName; | |
754 ID3D10EffectPass function(ID3D10EffectTechnique, UINT Index) GetPassByIndex; | |
755 ID3D10EffectPass function(ID3D10EffectTechnique, LPCSTR Name) GetPassByName; | |
756 HRESULT function(ID3D10EffectTechnique, D3D10_STATE_BLOCK_MASK* pStateBlockMask) ComputeStateBlockMask; | |
757 } | |
758 alias ID3D10EffectTechniqueVtbl** ID3D10EffectTechnique; | |
759 | |
760 struct D3D10_EFFECT_DESC { | |
761 BOOL IsChildEffect; | |
762 UINT ConstantBuffers; | |
763 UINT SharedConstantBuffers; | |
764 UINT GlobalVariables; | |
765 UINT SharedGlobalVariables; | |
766 UINT Techniques; | |
767 } | |
768 | |
769 extern (C) const GUID IID_ID3D10Effect = {0x51b0ca8b, 0xec0b, 0x4519, [0x87, 0xd, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7]}; | |
770 | |
771 interface ID3D10Effect : IUnknown { | |
772 extern(Windows) : | |
773 BOOL IsValid(); | |
774 BOOL IsPool(); | |
775 HRESULT GetDevice(ID3D10Device* ppDevice); | |
776 HRESULT GetDesc(D3D10_EFFECT_DESC* pDesc); | |
777 ID3D10EffectConstantBuffer GetConstantBufferByIndex(UINT Index); | |
778 ID3D10EffectConstantBuffer GetConstantBufferByName(LPCSTR Name); | |
779 ID3D10EffectVariable GetVariableByIndex(UINT Index); | |
780 ID3D10EffectVariable GetVariableByName(LPCSTR Name); | |
781 ID3D10EffectVariable GetVariableBySemantic(LPCSTR Semantic); | |
782 ID3D10EffectTechnique GetTechniqueByIndex(UINT Index); | |
783 ID3D10EffectTechnique GetTechniqueByName(LPCSTR Name); | |
784 HRESULT Optimize(); | |
785 BOOL IsOptimized(); | |
786 } | |
787 | |
788 extern (C) const GUID IID_ID3D10EffectPool = {0x9537ab04, 0x3250, 0x412e, [0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33]}; | |
789 | |
790 interface ID3D10EffectPool : IUnknown { | |
791 extern(Windows) : | |
792 ID3D10Effect AsEffect(); | |
793 } | |
794 | |
795 HRESULT D3D10CompileEffectFromMemory(void* pData, SIZE_T DataLength, LPCSTR pSrcFileName, D3D10_SHADER_MACRO* pDefines, ID3D10Include pInclude, UINT HLSLFlags, UINT FXFlags, ID3D10Blob* ppCompiledEffect, ID3D10Blob* ppErrors); | |
796 HRESULT D3D10CreateEffectFromMemory(void* pData, SIZE_T DataLength, UINT FXFlags, ID3D10Device pDevice, ID3D10EffectPool pEffectPool, ID3D10Effect* ppEffect); | |
797 HRESULT D3D10CreateEffectPoolFromMemory(void* pData, SIZE_T DataLength, UINT FXFlags, ID3D10Device pDevice, ID3D10EffectPool* ppEffectPool); | |
798 HRESULT D3D10DisassembleEffect(ID3D10Effect pEffect, BOOL EnableColorCode, ID3D10Blob* ppDisassembly); |