d3d10effect.h 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: D3D10Effect.h
  6. // Content: D3D10 Stateblock/Effect Types & APIs
  7. //
  8. //////////////////////////////////////////////////////////////////////////////
  9. #ifndef __D3D10EFFECT_H__
  10. #define __D3D10EFFECT_H__
  11. #include <winapifamily.h>
  12. #pragma region Desktop Family
  13. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  14. #include "d3d10.h"
  15. //////////////////////////////////////////////////////////////////////////////
  16. // File contents:
  17. //
  18. // 1) Stateblock enums, structs, interfaces, flat APIs
  19. // 2) Effect enums, structs, interfaces, flat APIs
  20. //////////////////////////////////////////////////////////////////////////////
  21. //----------------------------------------------------------------------------
  22. // D3D10_DEVICE_STATE_TYPES:
  23. //
  24. // Used in ID3D10StateBlockMask function calls
  25. //
  26. //----------------------------------------------------------------------------
  27. typedef enum _D3D10_DEVICE_STATE_TYPES
  28. {
  29. D3D10_DST_SO_BUFFERS=1, // Single-value state (atomical gets/sets)
  30. D3D10_DST_OM_RENDER_TARGETS, // Single-value state (atomical gets/sets)
  31. D3D10_DST_OM_DEPTH_STENCIL_STATE, // Single-value state
  32. D3D10_DST_OM_BLEND_STATE, // Single-value state
  33. D3D10_DST_VS, // Single-value state
  34. D3D10_DST_VS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT
  35. D3D10_DST_VS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
  36. D3D10_DST_VS_CONSTANT_BUFFERS, // Count:
  37. D3D10_DST_GS, // Single-value state
  38. D3D10_DST_GS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT
  39. D3D10_DST_GS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
  40. D3D10_DST_GS_CONSTANT_BUFFERS, // Count: D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
  41. D3D10_DST_PS, // Single-value state
  42. D3D10_DST_PS_SAMPLERS, // Count: D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT
  43. D3D10_DST_PS_SHADER_RESOURCES, // Count: D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
  44. D3D10_DST_PS_CONSTANT_BUFFERS, // Count: D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
  45. D3D10_DST_IA_VERTEX_BUFFERS, // Count: D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
  46. D3D10_DST_IA_INDEX_BUFFER, // Single-value state
  47. D3D10_DST_IA_INPUT_LAYOUT, // Single-value state
  48. D3D10_DST_IA_PRIMITIVE_TOPOLOGY, // Single-value state
  49. D3D10_DST_RS_VIEWPORTS, // Single-value state (atomical gets/sets)
  50. D3D10_DST_RS_SCISSOR_RECTS, // Single-value state (atomical gets/sets)
  51. D3D10_DST_RS_RASTERIZER_STATE, // Single-value state
  52. D3D10_DST_PREDICATION, // Single-value state
  53. } D3D10_DEVICE_STATE_TYPES;
  54. //----------------------------------------------------------------------------
  55. // D3D10_DEVICE_STATE_TYPES:
  56. //
  57. // Used in ID3D10StateBlockMask function calls
  58. //
  59. //----------------------------------------------------------------------------
  60. #ifndef D3D10_BYTES_FROM_BITS
  61. #define D3D10_BYTES_FROM_BITS(x) (((x) + 7) / 8)
  62. #endif // D3D10_BYTES_FROM_BITS
  63. typedef struct _D3D10_STATE_BLOCK_MASK
  64. {
  65. BYTE VS;
  66. BYTE VSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
  67. BYTE VSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
  68. BYTE VSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
  69. BYTE GS;
  70. BYTE GSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
  71. BYTE GSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
  72. BYTE GSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
  73. BYTE PS;
  74. BYTE PSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
  75. BYTE PSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
  76. BYTE PSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
  77. BYTE IAVertexBuffers[D3D10_BYTES_FROM_BITS(D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)];
  78. BYTE IAIndexBuffer;
  79. BYTE IAInputLayout;
  80. BYTE IAPrimitiveTopology;
  81. BYTE OMRenderTargets;
  82. BYTE OMDepthStencilState;
  83. BYTE OMBlendState;
  84. BYTE RSViewports;
  85. BYTE RSScissorRects;
  86. BYTE RSRasterizerState;
  87. BYTE SOBuffers;
  88. BYTE Predication;
  89. } D3D10_STATE_BLOCK_MASK;
  90. //////////////////////////////////////////////////////////////////////////////
  91. // ID3D10StateBlock //////////////////////////////////////////////////////////
  92. //////////////////////////////////////////////////////////////////////////////
  93. typedef interface ID3D10StateBlock ID3D10StateBlock;
  94. typedef interface ID3D10StateBlock *LPD3D10STATEBLOCK;
  95. // {0803425A-57F5-4dd6-9465-A87570834A08}
  96. DEFINE_GUID(IID_ID3D10StateBlock,
  97. 0x803425a, 0x57f5, 0x4dd6, 0x94, 0x65, 0xa8, 0x75, 0x70, 0x83, 0x4a, 0x8);
  98. #undef INTERFACE
  99. #define INTERFACE ID3D10StateBlock
  100. DECLARE_INTERFACE_(ID3D10StateBlock, IUnknown)
  101. {
  102. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
  103. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  104. STDMETHOD_(ULONG, Release)(THIS) PURE;
  105. STDMETHOD(Capture)(THIS) PURE;
  106. STDMETHOD(Apply)(THIS) PURE;
  107. STDMETHOD(ReleaseAllDeviceObjects)(THIS) PURE;
  108. STDMETHOD(GetDevice)(_Out_ THIS_ ID3D10Device **ppDevice) PURE;
  109. };
  110. #ifdef __cplusplus
  111. extern "C" {
  112. #endif //__cplusplus
  113. //----------------------------------------------------------------------------
  114. // D3D10_STATE_BLOCK_MASK and manipulation functions
  115. // -------------------------------------------------
  116. //
  117. // These functions exist to facilitate working with the D3D10_STATE_BLOCK_MASK
  118. // structure.
  119. //
  120. // D3D10_STATE_BLOCK_MASK *pResult or *pMask
  121. // The state block mask to operate on
  122. //
  123. // D3D10_STATE_BLOCK_MASK *pA, *pB
  124. // The source state block masks for the binary union/intersect/difference
  125. // operations.
  126. //
  127. // D3D10_DEVICE_STATE_TYPES StateType
  128. // The specific state type to enable/disable/query
  129. //
  130. // UINT RangeStart, RangeLength, Entry
  131. // The specific bit or range of bits for a given state type to operate on.
  132. // Consult the comments for D3D10_DEVICE_STATE_TYPES and
  133. // D3D10_STATE_BLOCK_MASK for information on the valid bit ranges for
  134. // each state.
  135. //
  136. //----------------------------------------------------------------------------
  137. HRESULT WINAPI D3D10StateBlockMaskUnion(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult);
  138. HRESULT WINAPI D3D10StateBlockMaskIntersect(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult);
  139. HRESULT WINAPI D3D10StateBlockMaskDifference(_In_ D3D10_STATE_BLOCK_MASK *pA, _In_ D3D10_STATE_BLOCK_MASK *pB, _Out_ D3D10_STATE_BLOCK_MASK *pResult);
  140. HRESULT WINAPI D3D10StateBlockMaskEnableCapture(_Inout_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength);
  141. HRESULT WINAPI D3D10StateBlockMaskDisableCapture(_Inout_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT RangeStart, UINT RangeLength);
  142. HRESULT WINAPI D3D10StateBlockMaskEnableAll(_Out_ D3D10_STATE_BLOCK_MASK *pMask);
  143. HRESULT WINAPI D3D10StateBlockMaskDisableAll(_Out_ D3D10_STATE_BLOCK_MASK *pMask);
  144. BOOL WINAPI D3D10StateBlockMaskGetSetting(_In_ D3D10_STATE_BLOCK_MASK *pMask, D3D10_DEVICE_STATE_TYPES StateType, UINT Entry);
  145. //----------------------------------------------------------------------------
  146. // D3D10CreateStateBlock
  147. // ---------------------
  148. //
  149. // Creates a state block object based on the mask settings specified
  150. // in a D3D10_STATE_BLOCK_MASK structure.
  151. //
  152. // ID3D10Device *pDevice
  153. // The device interface to associate with this state block
  154. //
  155. // D3D10_STATE_BLOCK_MASK *pStateBlockMask
  156. // A bit mask whose settings are used to generate a state block
  157. // object.
  158. //
  159. // ID3D10StateBlock **ppStateBlock
  160. // The resulting state block object. This object will save/restore
  161. // only those pieces of state that were set in the state block
  162. // bit mask
  163. //----------------------------------------------------------------------------
  164. HRESULT WINAPI D3D10CreateStateBlock(_In_ ID3D10Device *pDevice, _In_ D3D10_STATE_BLOCK_MASK *pStateBlockMask, _Out_ ID3D10StateBlock **ppStateBlock);
  165. #ifdef __cplusplus
  166. }
  167. #endif //__cplusplus
  168. //----------------------------------------------------------------------------
  169. // D3D10_COMPILE & D3D10_EFFECT flags:
  170. // -------------------------------------
  171. //
  172. // These flags are passed in when creating an effect, and affect
  173. // either compilation behavior or runtime effect behavior
  174. //
  175. // D3D10_EFFECT_COMPILE_CHILD_EFFECT
  176. // Compile this .fx file to a child effect. Child effects have no initializers
  177. // for any shared values as these are initialied in the master effect (pool).
  178. //
  179. // D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS
  180. // By default, performance mode is enabled. Performance mode disallows
  181. // mutable state objects by preventing non-literal expressions from appearing in
  182. // state object definitions. Specifying this flag will disable the mode and allow
  183. // for mutable state objects.
  184. //
  185. // D3D10_EFFECT_SINGLE_THREADED
  186. // Do not attempt to synchronize with other threads loading effects into the
  187. // same pool.
  188. //
  189. //----------------------------------------------------------------------------
  190. #define D3D10_EFFECT_COMPILE_CHILD_EFFECT (1 << 0)
  191. #define D3D10_EFFECT_COMPILE_ALLOW_SLOW_OPS (1 << 1)
  192. #define D3D10_EFFECT_SINGLE_THREADED (1 << 3)
  193. //----------------------------------------------------------------------------
  194. // D3D10_EFFECT_VARIABLE flags:
  195. // ----------------------------
  196. //
  197. // These flags describe an effect variable (global or annotation),
  198. // and are returned in D3D10_EFFECT_VARIABLE_DESC::Flags.
  199. //
  200. // D3D10_EFFECT_VARIABLE_POOLED
  201. // Indicates that the this variable or constant buffer resides
  202. // in an effect pool. If this flag is not set, then the variable resides
  203. // in a standalone effect (if ID3D10Effect::GetPool returns NULL)
  204. // or a child effect (if ID3D10Effect::GetPool returns non-NULL)
  205. //
  206. // D3D10_EFFECT_VARIABLE_ANNOTATION
  207. // Indicates that this is an annotation on a technique, pass, or global
  208. // variable. Otherwise, this is a global variable. Annotations cannot
  209. // be shared.
  210. //
  211. // D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT
  212. // Indicates that the variable has been explicitly bound using the
  213. // register keyword.
  214. //----------------------------------------------------------------------------
  215. #define D3D10_EFFECT_VARIABLE_POOLED (1 << 0)
  216. #define D3D10_EFFECT_VARIABLE_ANNOTATION (1 << 1)
  217. #define D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT (1 << 2)
  218. //////////////////////////////////////////////////////////////////////////////
  219. // ID3D10EffectType //////////////////////////////////////////////////////////
  220. //////////////////////////////////////////////////////////////////////////////
  221. //----------------------------------------------------------------------------
  222. // D3D10_EFFECT_TYPE_DESC:
  223. //
  224. // Retrieved by ID3D10EffectType::GetDesc()
  225. //----------------------------------------------------------------------------
  226. typedef struct _D3D10_EFFECT_TYPE_DESC
  227. {
  228. LPCSTR TypeName; // Name of the type
  229. // (e.g. "float4" or "MyStruct")
  230. D3D10_SHADER_VARIABLE_CLASS Class; // (e.g. scalar, vector, object, etc.)
  231. D3D10_SHADER_VARIABLE_TYPE Type; // (e.g. float, texture, vertexshader, etc.)
  232. UINT Elements; // Number of elements in this type
  233. // (0 if not an array)
  234. UINT Members; // Number of members
  235. // (0 if not a structure)
  236. UINT Rows; // Number of rows in this type
  237. // (0 if not a numeric primitive)
  238. UINT Columns; // Number of columns in this type
  239. // (0 if not a numeric primitive)
  240. UINT PackedSize; // Number of bytes required to represent
  241. // this data type, when tightly packed
  242. UINT UnpackedSize; // Number of bytes occupied by this data
  243. // type, when laid out in a constant buffer
  244. UINT Stride; // Number of bytes to seek between elements,
  245. // when laid out in a constant buffer
  246. } D3D10_EFFECT_TYPE_DESC;
  247. typedef interface ID3D10EffectType ID3D10EffectType;
  248. typedef interface ID3D10EffectType *LPD3D10EFFECTTYPE;
  249. // {4E9E1DDC-CD9D-4772-A837-00180B9B88FD}
  250. DEFINE_GUID(IID_ID3D10EffectType,
  251. 0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x0, 0x18, 0xb, 0x9b, 0x88, 0xfd);
  252. #undef INTERFACE
  253. #define INTERFACE ID3D10EffectType
  254. DECLARE_INTERFACE(ID3D10EffectType)
  255. {
  256. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  257. STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_TYPE_DESC *pDesc) PURE;
  258. STDMETHOD_(ID3D10EffectType*, GetMemberTypeByIndex)(THIS_ UINT Index) PURE;
  259. STDMETHOD_(ID3D10EffectType*, GetMemberTypeByName)(THIS_ LPCSTR Name) PURE;
  260. STDMETHOD_(ID3D10EffectType*, GetMemberTypeBySemantic)(THIS_ LPCSTR Semantic) PURE;
  261. STDMETHOD_(LPCSTR, GetMemberName)(THIS_ UINT Index) PURE;
  262. STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ UINT Index) PURE;
  263. };
  264. //////////////////////////////////////////////////////////////////////////////
  265. // ID3D10EffectVariable //////////////////////////////////////////////////////
  266. //////////////////////////////////////////////////////////////////////////////
  267. //----------------------------------------------------------------------------
  268. // D3D10_EFFECT_VARIABLE_DESC:
  269. //
  270. // Retrieved by ID3D10EffectVariable::GetDesc()
  271. //----------------------------------------------------------------------------
  272. typedef struct _D3D10_EFFECT_VARIABLE_DESC
  273. {
  274. LPCSTR Name; // Name of this variable, annotation,
  275. // or structure member
  276. LPCSTR Semantic; // Semantic string of this variable
  277. // or structure member (NULL for
  278. // annotations or if not present)
  279. UINT Flags; // D3D10_EFFECT_VARIABLE_* flags
  280. UINT Annotations; // Number of annotations on this variable
  281. // (always 0 for annotations)
  282. UINT BufferOffset; // Offset into containing cbuffer or tbuffer
  283. // (always 0 for annotations or variables
  284. // not in constant buffers)
  285. UINT ExplicitBindPoint; // Used if the variable has been explicitly bound
  286. // using the register keyword. Check Flags for
  287. // D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT;
  288. } D3D10_EFFECT_VARIABLE_DESC;
  289. typedef interface ID3D10EffectVariable ID3D10EffectVariable;
  290. typedef interface ID3D10EffectVariable *LPD3D10EFFECTVARIABLE;
  291. // {AE897105-00E6-45bf-BB8E-281DD6DB8E1B}
  292. DEFINE_GUID(IID_ID3D10EffectVariable,
  293. 0xae897105, 0xe6, 0x45bf, 0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b);
  294. #undef INTERFACE
  295. #define INTERFACE ID3D10EffectVariable
  296. // Forward defines
  297. typedef interface ID3D10EffectScalarVariable ID3D10EffectScalarVariable;
  298. typedef interface ID3D10EffectVectorVariable ID3D10EffectVectorVariable;
  299. typedef interface ID3D10EffectMatrixVariable ID3D10EffectMatrixVariable;
  300. typedef interface ID3D10EffectStringVariable ID3D10EffectStringVariable;
  301. typedef interface ID3D10EffectShaderResourceVariable ID3D10EffectShaderResourceVariable;
  302. typedef interface ID3D10EffectRenderTargetViewVariable ID3D10EffectRenderTargetViewVariable;
  303. typedef interface ID3D10EffectDepthStencilViewVariable ID3D10EffectDepthStencilViewVariable;
  304. typedef interface ID3D10EffectConstantBuffer ID3D10EffectConstantBuffer;
  305. typedef interface ID3D10EffectShaderVariable ID3D10EffectShaderVariable;
  306. typedef interface ID3D10EffectBlendVariable ID3D10EffectBlendVariable;
  307. typedef interface ID3D10EffectDepthStencilVariable ID3D10EffectDepthStencilVariable;
  308. typedef interface ID3D10EffectRasterizerVariable ID3D10EffectRasterizerVariable;
  309. typedef interface ID3D10EffectSamplerVariable ID3D10EffectSamplerVariable;
  310. DECLARE_INTERFACE(ID3D10EffectVariable)
  311. {
  312. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  313. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  314. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  315. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  316. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  317. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  318. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  319. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  320. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  321. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  322. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  323. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  324. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  325. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  326. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  327. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  328. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  329. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  330. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  331. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  332. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  333. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  334. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  335. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  336. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  337. };
  338. //////////////////////////////////////////////////////////////////////////////
  339. // ID3D10EffectScalarVariable ////////////////////////////////////////////////
  340. //////////////////////////////////////////////////////////////////////////////
  341. typedef interface ID3D10EffectScalarVariable ID3D10EffectScalarVariable;
  342. typedef interface ID3D10EffectScalarVariable *LPD3D10EFFECTSCALARVARIABLE;
  343. // {00E48F7B-D2C8-49e8-A86C-022DEE53431F}
  344. DEFINE_GUID(IID_ID3D10EffectScalarVariable,
  345. 0xe48f7b, 0xd2c8, 0x49e8, 0xa8, 0x6c, 0x2, 0x2d, 0xee, 0x53, 0x43, 0x1f);
  346. #undef INTERFACE
  347. #define INTERFACE ID3D10EffectScalarVariable
  348. DECLARE_INTERFACE_(ID3D10EffectScalarVariable, ID3D10EffectVariable)
  349. {
  350. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  351. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  352. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  353. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  354. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  355. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  356. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  357. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  358. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  359. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  360. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  361. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  362. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  363. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  364. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  365. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  366. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  367. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  368. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  369. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  370. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  371. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  372. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  373. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  374. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  375. STDMETHOD(SetFloat)(THIS_ float Value) PURE;
  376. STDMETHOD(GetFloat)(THIS_ _Out_ float *pValue) PURE;
  377. STDMETHOD(SetFloatArray)(THIS_ _In_reads_(Count) float *pData, UINT Offset, UINT Count) PURE;
  378. STDMETHOD(GetFloatArray)(THIS_ _Out_writes_(Count) float *pData, UINT Offset, UINT Count) PURE;
  379. STDMETHOD(SetInt)(THIS_ int Value) PURE;
  380. STDMETHOD(GetInt)(THIS_ _Out_ int *pValue) PURE;
  381. STDMETHOD(SetIntArray)(THIS_ _In_reads_(Count) int *pData, UINT Offset, UINT Count) PURE;
  382. STDMETHOD(GetIntArray)(THIS_ _Out_writes_(Count) int *pData, UINT Offset, UINT Count) PURE;
  383. STDMETHOD(SetBool)(THIS_ BOOL Value) PURE;
  384. STDMETHOD(GetBool)(THIS_ _Out_ BOOL *pValue) PURE;
  385. STDMETHOD(SetBoolArray)(THIS_ _In_reads_(Count) BOOL *pData, UINT Offset, UINT Count) PURE;
  386. STDMETHOD(GetBoolArray)(THIS_ _Out_writes_(Count) BOOL *pData, UINT Offset, UINT Count) PURE;
  387. };
  388. //////////////////////////////////////////////////////////////////////////////
  389. // ID3D10EffectVectorVariable ////////////////////////////////////////////////
  390. //////////////////////////////////////////////////////////////////////////////
  391. typedef interface ID3D10EffectVectorVariable ID3D10EffectVectorVariable;
  392. typedef interface ID3D10EffectVectorVariable *LPD3D10EFFECTVECTORVARIABLE;
  393. // {62B98C44-1F82-4c67-BCD0-72CF8F217E81}
  394. DEFINE_GUID(IID_ID3D10EffectVectorVariable,
  395. 0x62b98c44, 0x1f82, 0x4c67, 0xbc, 0xd0, 0x72, 0xcf, 0x8f, 0x21, 0x7e, 0x81);
  396. #undef INTERFACE
  397. #define INTERFACE ID3D10EffectVectorVariable
  398. DECLARE_INTERFACE_(ID3D10EffectVectorVariable, ID3D10EffectVariable)
  399. {
  400. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  401. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  402. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  403. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  404. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  405. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  406. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  407. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  408. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  409. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  410. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  411. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  412. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  413. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  414. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  415. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  416. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  417. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  418. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  419. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  420. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  421. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  422. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  423. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  424. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  425. STDMETHOD(SetBoolVector) (THIS_ BOOL *pData) PURE;
  426. STDMETHOD(SetIntVector) (THIS_ int *pData) PURE;
  427. STDMETHOD(SetFloatVector)(THIS_ float *pData) PURE;
  428. STDMETHOD(GetBoolVector) (THIS_ BOOL *pData) PURE;
  429. STDMETHOD(GetIntVector) (THIS_ int *pData) PURE;
  430. STDMETHOD(GetFloatVector)(THIS_ float *pData) PURE;
  431. STDMETHOD(SetBoolVectorArray) (THIS_ BOOL *pData, UINT Offset, UINT Count) PURE;
  432. STDMETHOD(SetIntVectorArray) (THIS_ int *pData, UINT Offset, UINT Count) PURE;
  433. STDMETHOD(SetFloatVectorArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  434. STDMETHOD(GetBoolVectorArray) (THIS_ BOOL *pData, UINT Offset, UINT Count) PURE;
  435. STDMETHOD(GetIntVectorArray) (THIS_ int *pData, UINT Offset, UINT Count) PURE;
  436. STDMETHOD(GetFloatVectorArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  437. };
  438. //////////////////////////////////////////////////////////////////////////////
  439. // ID3D10EffectMatrixVariable ////////////////////////////////////////////////
  440. //////////////////////////////////////////////////////////////////////////////
  441. typedef interface ID3D10EffectMatrixVariable ID3D10EffectMatrixVariable;
  442. typedef interface ID3D10EffectMatrixVariable *LPD3D10EFFECTMATRIXVARIABLE;
  443. // {50666C24-B82F-4eed-A172-5B6E7E8522E0}
  444. DEFINE_GUID(IID_ID3D10EffectMatrixVariable,
  445. 0x50666c24, 0xb82f, 0x4eed, 0xa1, 0x72, 0x5b, 0x6e, 0x7e, 0x85, 0x22, 0xe0);
  446. #undef INTERFACE
  447. #define INTERFACE ID3D10EffectMatrixVariable
  448. DECLARE_INTERFACE_(ID3D10EffectMatrixVariable, ID3D10EffectVariable)
  449. {
  450. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  451. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  452. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  453. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  454. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  455. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  456. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  457. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  458. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  459. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  460. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  461. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  462. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  463. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  464. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  465. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  466. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  467. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  468. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  469. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  470. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  471. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  472. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  473. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  474. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT ByteOffset, UINT ByteCount) PURE;
  475. STDMETHOD(SetMatrix)(THIS_ float *pData) PURE;
  476. STDMETHOD(GetMatrix)(THIS_ float *pData) PURE;
  477. STDMETHOD(SetMatrixArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  478. STDMETHOD(GetMatrixArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  479. STDMETHOD(SetMatrixTranspose)(THIS_ float *pData) PURE;
  480. STDMETHOD(GetMatrixTranspose)(THIS_ float *pData) PURE;
  481. STDMETHOD(SetMatrixTransposeArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  482. STDMETHOD(GetMatrixTransposeArray)(THIS_ float *pData, UINT Offset, UINT Count) PURE;
  483. };
  484. //////////////////////////////////////////////////////////////////////////////
  485. // ID3D10EffectStringVariable ////////////////////////////////////////////////
  486. //////////////////////////////////////////////////////////////////////////////
  487. typedef interface ID3D10EffectStringVariable ID3D10EffectStringVariable;
  488. typedef interface ID3D10EffectStringVariable *LPD3D10EFFECTSTRINGVARIABLE;
  489. // {71417501-8DF9-4e0a-A78A-255F9756BAFF}
  490. DEFINE_GUID(IID_ID3D10EffectStringVariable,
  491. 0x71417501, 0x8df9, 0x4e0a, 0xa7, 0x8a, 0x25, 0x5f, 0x97, 0x56, 0xba, 0xff);
  492. #undef INTERFACE
  493. #define INTERFACE ID3D10EffectStringVariable
  494. DECLARE_INTERFACE_(ID3D10EffectStringVariable, ID3D10EffectVariable)
  495. {
  496. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  497. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  498. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  499. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  500. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  501. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  502. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  503. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  504. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  505. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  506. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  507. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  508. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  509. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  510. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  511. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  512. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  513. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  514. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  515. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  516. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  517. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  518. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  519. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  520. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  521. STDMETHOD(GetString)(THIS_ _Out_ LPCSTR *ppString) PURE;
  522. STDMETHOD(GetStringArray)(THIS_ _Out_writes_(Count) LPCSTR *ppStrings, UINT Offset, UINT Count) PURE;
  523. };
  524. //////////////////////////////////////////////////////////////////////////////
  525. // ID3D10EffectShaderResourceVariable ////////////////////////////////////////
  526. //////////////////////////////////////////////////////////////////////////////
  527. typedef interface ID3D10EffectShaderResourceVariable ID3D10EffectShaderResourceVariable;
  528. typedef interface ID3D10EffectShaderResourceVariable *LPD3D10EFFECTSHADERRESOURCEVARIABLE;
  529. // {C0A7157B-D872-4b1d-8073-EFC2ACD4B1FC}
  530. DEFINE_GUID(IID_ID3D10EffectShaderResourceVariable,
  531. 0xc0a7157b, 0xd872, 0x4b1d, 0x80, 0x73, 0xef, 0xc2, 0xac, 0xd4, 0xb1, 0xfc);
  532. #undef INTERFACE
  533. #define INTERFACE ID3D10EffectShaderResourceVariable
  534. DECLARE_INTERFACE_(ID3D10EffectShaderResourceVariable, ID3D10EffectVariable)
  535. {
  536. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  537. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  538. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  539. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  540. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  541. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  542. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  543. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  544. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  545. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  546. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  547. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  548. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  549. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  550. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  551. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  552. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  553. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  554. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  555. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  556. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  557. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  558. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  559. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  560. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  561. STDMETHOD(SetResource)(THIS_ _In_opt_ ID3D10ShaderResourceView *pResource) PURE;
  562. STDMETHOD(GetResource)(THIS_ _Out_ ID3D10ShaderResourceView **ppResource) PURE;
  563. STDMETHOD(SetResourceArray)(THIS_ _In_reads_(Count) ID3D10ShaderResourceView **ppResources, UINT Offset, UINT Count) PURE;
  564. STDMETHOD(GetResourceArray)(THIS_ _Out_writes_(Count) ID3D10ShaderResourceView **ppResources, UINT Offset, UINT Count) PURE;
  565. };
  566. //////////////////////////////////////////////////////////////////////////////
  567. // ID3D10EffectRenderTargetViewVariable //////////////////////////////////////
  568. //////////////////////////////////////////////////////////////////////////////
  569. typedef interface ID3D10EffectRenderTargetViewVariable ID3D10EffectRenderTargetViewVariable;
  570. typedef interface ID3D10EffectRenderTargetViewVariable *LPD3D10EFFECTRENDERTARGETVIEWVARIABLE;
  571. // {28CA0CC3-C2C9-40bb-B57F-67B737122B17}
  572. DEFINE_GUID(IID_ID3D10EffectRenderTargetViewVariable,
  573. 0x28ca0cc3, 0xc2c9, 0x40bb, 0xb5, 0x7f, 0x67, 0xb7, 0x37, 0x12, 0x2b, 0x17);
  574. #undef INTERFACE
  575. #define INTERFACE ID3D10EffectRenderTargetViewVariable
  576. DECLARE_INTERFACE_(ID3D10EffectRenderTargetViewVariable, ID3D10EffectVariable)
  577. {
  578. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  579. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  580. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  581. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  582. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  583. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  584. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  585. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  586. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  587. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  588. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  589. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  590. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  591. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  592. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  593. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  594. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  595. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  596. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  597. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  598. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  599. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  600. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  601. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  602. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  603. STDMETHOD(SetRenderTarget)(THIS_ _In_opt_ ID3D10RenderTargetView *pResource) PURE;
  604. STDMETHOD(GetRenderTarget)(THIS_ _Out_ ID3D10RenderTargetView **ppResource) PURE;
  605. STDMETHOD(SetRenderTargetArray)(THIS_ _In_reads_(Count) ID3D10RenderTargetView **ppResources, UINT Offset, UINT Count) PURE;
  606. STDMETHOD(GetRenderTargetArray)(THIS_ _Out_writes_(Count) ID3D10RenderTargetView **ppResources, UINT Offset, UINT Count) PURE;
  607. };
  608. //////////////////////////////////////////////////////////////////////////////
  609. // ID3D10EffectDepthStencilViewVariable //////////////////////////////////////
  610. //////////////////////////////////////////////////////////////////////////////
  611. typedef interface ID3D10EffectDepthStencilViewVariable ID3D10EffectDepthStencilViewVariable;
  612. typedef interface ID3D10EffectDepthStencilViewVariable *LPD3D10EFFECTDEPTHSTENCILVIEWVARIABLE;
  613. // {3E02C918-CC79-4985-B622-2D92AD701623}
  614. DEFINE_GUID(IID_ID3D10EffectDepthStencilViewVariable,
  615. 0x3e02c918, 0xcc79, 0x4985, 0xb6, 0x22, 0x2d, 0x92, 0xad, 0x70, 0x16, 0x23);
  616. #undef INTERFACE
  617. #define INTERFACE ID3D10EffectDepthStencilViewVariable
  618. DECLARE_INTERFACE_(ID3D10EffectDepthStencilViewVariable, ID3D10EffectVariable)
  619. {
  620. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  621. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  622. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  623. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  624. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  625. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  626. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  627. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  628. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  629. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  630. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  631. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  632. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  633. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  634. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  635. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  636. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  637. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  638. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  639. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  640. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  641. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  642. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  643. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  644. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  645. STDMETHOD(SetDepthStencil)(THIS_ _In_opt_ ID3D10DepthStencilView *pResource) PURE;
  646. STDMETHOD(GetDepthStencil)(THIS_ _Out_ ID3D10DepthStencilView **ppResource) PURE;
  647. STDMETHOD(SetDepthStencilArray)(THIS_ _In_reads_(Count) ID3D10DepthStencilView **ppResources, UINT Offset, UINT Count) PURE;
  648. STDMETHOD(GetDepthStencilArray)(THIS_ _Out_writes_(Count) ID3D10DepthStencilView **ppResources, UINT Offset, UINT Count) PURE;
  649. };
  650. //////////////////////////////////////////////////////////////////////////////
  651. // ID3D10EffectConstantBuffer ////////////////////////////////////////////////
  652. //////////////////////////////////////////////////////////////////////////////
  653. typedef interface ID3D10EffectConstantBuffer ID3D10EffectConstantBuffer;
  654. typedef interface ID3D10EffectConstantBuffer *LPD3D10EFFECTCONSTANTBUFFER;
  655. // {56648F4D-CC8B-4444-A5AD-B5A3D76E91B3}
  656. DEFINE_GUID(IID_ID3D10EffectConstantBuffer,
  657. 0x56648f4d, 0xcc8b, 0x4444, 0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3);
  658. #undef INTERFACE
  659. #define INTERFACE ID3D10EffectConstantBuffer
  660. DECLARE_INTERFACE_(ID3D10EffectConstantBuffer, ID3D10EffectVariable)
  661. {
  662. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  663. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  664. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  665. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  666. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  667. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  668. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  669. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  670. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  671. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  672. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  673. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  674. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  675. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  676. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  677. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  678. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  679. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  680. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  681. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  682. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  683. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  684. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  685. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  686. STDMETHOD(SetConstantBuffer)(THIS_ _In_opt_ ID3D10Buffer *pConstantBuffer) PURE;
  687. STDMETHOD(GetConstantBuffer)(THIS_ _Out_ ID3D10Buffer **ppConstantBuffer) PURE;
  688. STDMETHOD(SetTextureBuffer)(THIS_ _In_opt_ ID3D10ShaderResourceView *pTextureBuffer) PURE;
  689. STDMETHOD(GetTextureBuffer)(THIS_ _Out_ ID3D10ShaderResourceView **ppTextureBuffer) PURE;
  690. };
  691. //////////////////////////////////////////////////////////////////////////////
  692. // ID3D10EffectShaderVariable ////////////////////////////////////////////////
  693. //////////////////////////////////////////////////////////////////////////////
  694. //----------------------------------------------------------------------------
  695. // D3D10_EFFECT_SHADER_DESC:
  696. //
  697. // Retrieved by ID3D10EffectShaderVariable::GetShaderDesc()
  698. //----------------------------------------------------------------------------
  699. typedef struct _D3D10_EFFECT_SHADER_DESC
  700. {
  701. CONST BYTE *pInputSignature; // Passed into CreateInputLayout,
  702. // valid on VS and GS only
  703. BOOL IsInline; // Is this an anonymous shader variable
  704. // resulting from an inline shader assignment?
  705. // -- The following fields are not valid after Optimize() --
  706. CONST BYTE *pBytecode; // Shader bytecode
  707. UINT BytecodeLength;
  708. LPCSTR SODecl; // Stream out declaration string (for GS with SO)
  709. UINT NumInputSignatureEntries; // Number of entries in the input signature
  710. UINT NumOutputSignatureEntries; // Number of entries in the output signature
  711. } D3D10_EFFECT_SHADER_DESC;
  712. typedef interface ID3D10EffectShaderVariable ID3D10EffectShaderVariable;
  713. typedef interface ID3D10EffectShaderVariable *LPD3D10EFFECTSHADERVARIABLE;
  714. // {80849279-C799-4797-8C33-0407A07D9E06}
  715. DEFINE_GUID(IID_ID3D10EffectShaderVariable,
  716. 0x80849279, 0xc799, 0x4797, 0x8c, 0x33, 0x4, 0x7, 0xa0, 0x7d, 0x9e, 0x6);
  717. #undef INTERFACE
  718. #define INTERFACE ID3D10EffectShaderVariable
  719. DECLARE_INTERFACE_(ID3D10EffectShaderVariable, ID3D10EffectVariable)
  720. {
  721. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  722. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  723. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  724. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  725. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  726. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  727. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  728. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  729. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  730. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  731. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  732. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  733. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  734. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  735. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  736. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  737. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  738. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  739. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  740. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  741. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  742. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  743. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  744. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  745. STDMETHOD(GetShaderDesc)(THIS_ UINT ShaderIndex, _Out_ D3D10_EFFECT_SHADER_DESC *pDesc) PURE;
  746. STDMETHOD(GetVertexShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10VertexShader **ppVS) PURE;
  747. STDMETHOD(GetGeometryShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10GeometryShader **ppGS) PURE;
  748. STDMETHOD(GetPixelShader)(THIS_ UINT ShaderIndex, _Out_ ID3D10PixelShader **ppPS) PURE;
  749. STDMETHOD(GetInputSignatureElementDesc)(THIS_ UINT ShaderIndex, UINT Element, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
  750. STDMETHOD(GetOutputSignatureElementDesc)(THIS_ UINT ShaderIndex, UINT Element, _Out_ D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
  751. };
  752. //////////////////////////////////////////////////////////////////////////////
  753. // ID3D10EffectBlendVariable /////////////////////////////////////////////////
  754. //////////////////////////////////////////////////////////////////////////////
  755. typedef interface ID3D10EffectBlendVariable ID3D10EffectBlendVariable;
  756. typedef interface ID3D10EffectBlendVariable *LPD3D10EFFECTBLENDVARIABLE;
  757. // {1FCD2294-DF6D-4eae-86B3-0E9160CFB07B}
  758. DEFINE_GUID(IID_ID3D10EffectBlendVariable,
  759. 0x1fcd2294, 0xdf6d, 0x4eae, 0x86, 0xb3, 0xe, 0x91, 0x60, 0xcf, 0xb0, 0x7b);
  760. #undef INTERFACE
  761. #define INTERFACE ID3D10EffectBlendVariable
  762. DECLARE_INTERFACE_(ID3D10EffectBlendVariable, ID3D10EffectVariable)
  763. {
  764. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  765. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  766. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  767. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  768. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  769. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  770. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  771. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  772. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  773. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  774. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  775. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  776. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  777. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  778. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  779. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  780. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  781. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  782. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  783. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  784. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  785. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  786. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  787. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  788. STDMETHOD(GetBlendState)(THIS_ UINT Index, ID3D10BlendState **ppBlendState) PURE;
  789. STDMETHOD(GetBackingStore)(THIS_ UINT Index, D3D10_BLEND_DESC *pBlendDesc) PURE;
  790. };
  791. //////////////////////////////////////////////////////////////////////////////
  792. // ID3D10EffectDepthStencilVariable //////////////////////////////////////////
  793. //////////////////////////////////////////////////////////////////////////////
  794. typedef interface ID3D10EffectDepthStencilVariable ID3D10EffectDepthStencilVariable;
  795. typedef interface ID3D10EffectDepthStencilVariable *LPD3D10EFFECTDEPTHSTENCILVARIABLE;
  796. // {AF482368-330A-46a5-9A5C-01C71AF24C8D}
  797. DEFINE_GUID(IID_ID3D10EffectDepthStencilVariable,
  798. 0xaf482368, 0x330a, 0x46a5, 0x9a, 0x5c, 0x1, 0xc7, 0x1a, 0xf2, 0x4c, 0x8d);
  799. #undef INTERFACE
  800. #define INTERFACE ID3D10EffectDepthStencilVariable
  801. DECLARE_INTERFACE_(ID3D10EffectDepthStencilVariable, ID3D10EffectVariable)
  802. {
  803. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  804. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  805. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  806. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  807. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  808. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  809. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  810. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  811. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  812. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  813. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  814. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  815. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  816. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  817. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  818. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  819. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  820. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  821. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  822. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  823. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  824. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  825. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  826. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  827. STDMETHOD(GetDepthStencilState)(THIS_ UINT Index, _Out_ ID3D10DepthStencilState **ppDepthStencilState) PURE;
  828. STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc) PURE;
  829. };
  830. //////////////////////////////////////////////////////////////////////////////
  831. // ID3D10EffectRasterizerVariable ////////////////////////////////////////////
  832. //////////////////////////////////////////////////////////////////////////////
  833. typedef interface ID3D10EffectRasterizerVariable ID3D10EffectRasterizerVariable;
  834. typedef interface ID3D10EffectRasterizerVariable *LPD3D10EFFECTRASTERIZERVARIABLE;
  835. // {21AF9F0E-4D94-4ea9-9785-2CB76B8C0B34}
  836. DEFINE_GUID(IID_ID3D10EffectRasterizerVariable,
  837. 0x21af9f0e, 0x4d94, 0x4ea9, 0x97, 0x85, 0x2c, 0xb7, 0x6b, 0x8c, 0xb, 0x34);
  838. #undef INTERFACE
  839. #define INTERFACE ID3D10EffectRasterizerVariable
  840. DECLARE_INTERFACE_(ID3D10EffectRasterizerVariable, ID3D10EffectVariable)
  841. {
  842. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  843. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  844. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  845. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  846. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  847. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  848. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  849. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  850. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  851. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  852. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  853. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  854. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  855. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  856. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  857. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  858. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  859. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  860. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  861. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  862. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  863. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  864. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  865. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  866. STDMETHOD(GetRasterizerState)(THIS_ UINT Index, _Out_ ID3D10RasterizerState **ppRasterizerState) PURE;
  867. STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_RASTERIZER_DESC *pRasterizerDesc) PURE;
  868. };
  869. //////////////////////////////////////////////////////////////////////////////
  870. // ID3D10EffectSamplerVariable ///////////////////////////////////////////////
  871. //////////////////////////////////////////////////////////////////////////////
  872. typedef interface ID3D10EffectSamplerVariable ID3D10EffectSamplerVariable;
  873. typedef interface ID3D10EffectSamplerVariable *LPD3D10EFFECTSAMPLERVARIABLE;
  874. // {6530D5C7-07E9-4271-A418-E7CE4BD1E480}
  875. DEFINE_GUID(IID_ID3D10EffectSamplerVariable,
  876. 0x6530d5c7, 0x7e9, 0x4271, 0xa4, 0x18, 0xe7, 0xce, 0x4b, 0xd1, 0xe4, 0x80);
  877. #undef INTERFACE
  878. #define INTERFACE ID3D10EffectSamplerVariable
  879. DECLARE_INTERFACE_(ID3D10EffectSamplerVariable, ID3D10EffectVariable)
  880. {
  881. STDMETHOD_(ID3D10EffectType*, GetType)(THIS) PURE;
  882. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_VARIABLE_DESC *pDesc) PURE;
  883. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  884. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  885. STDMETHOD_(ID3D10EffectVariable*, GetMemberByIndex)(THIS_ UINT Index) PURE;
  886. STDMETHOD_(ID3D10EffectVariable*, GetMemberByName)(THIS_ LPCSTR Name) PURE;
  887. STDMETHOD_(ID3D10EffectVariable*, GetMemberBySemantic)(THIS_ LPCSTR Semantic) PURE;
  888. STDMETHOD_(ID3D10EffectVariable*, GetElement)(THIS_ UINT Index) PURE;
  889. STDMETHOD_(ID3D10EffectConstantBuffer*, GetParentConstantBuffer)(THIS) PURE;
  890. STDMETHOD_(ID3D10EffectScalarVariable*, AsScalar)(THIS) PURE;
  891. STDMETHOD_(ID3D10EffectVectorVariable*, AsVector)(THIS) PURE;
  892. STDMETHOD_(ID3D10EffectMatrixVariable*, AsMatrix)(THIS) PURE;
  893. STDMETHOD_(ID3D10EffectStringVariable*, AsString)(THIS) PURE;
  894. STDMETHOD_(ID3D10EffectShaderResourceVariable*, AsShaderResource)(THIS) PURE;
  895. STDMETHOD_(ID3D10EffectRenderTargetViewVariable*, AsRenderTargetView)(THIS) PURE;
  896. STDMETHOD_(ID3D10EffectDepthStencilViewVariable*, AsDepthStencilView)(THIS) PURE;
  897. STDMETHOD_(ID3D10EffectConstantBuffer*, AsConstantBuffer)(THIS) PURE;
  898. STDMETHOD_(ID3D10EffectShaderVariable*, AsShader)(THIS) PURE;
  899. STDMETHOD_(ID3D10EffectBlendVariable*, AsBlend)(THIS) PURE;
  900. STDMETHOD_(ID3D10EffectDepthStencilVariable*, AsDepthStencil)(THIS) PURE;
  901. STDMETHOD_(ID3D10EffectRasterizerVariable*, AsRasterizer)(THIS) PURE;
  902. STDMETHOD_(ID3D10EffectSamplerVariable*, AsSampler)(THIS) PURE;
  903. STDMETHOD(SetRawValue)(THIS_ _In_reads_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  904. STDMETHOD(GetRawValue)(THIS_ _Out_writes_bytes_(ByteCount) void *pData, UINT Offset, UINT ByteCount) PURE;
  905. STDMETHOD(GetSampler)(THIS_ UINT Index, _Out_ ID3D10SamplerState **ppSampler) PURE;
  906. STDMETHOD(GetBackingStore)(THIS_ UINT Index, _Out_ D3D10_SAMPLER_DESC *pSamplerDesc) PURE;
  907. };
  908. //////////////////////////////////////////////////////////////////////////////
  909. // ID3D10EffectPass //////////////////////////////////////////////////////////
  910. //////////////////////////////////////////////////////////////////////////////
  911. //----------------------------------------------------------------------------
  912. // D3D10_PASS_DESC:
  913. //
  914. // Retrieved by ID3D10EffectPass::GetDesc()
  915. //----------------------------------------------------------------------------
  916. typedef struct _D3D10_PASS_DESC
  917. {
  918. LPCSTR Name; // Name of this pass (NULL if not anonymous)
  919. UINT Annotations; // Number of annotations on this pass
  920. BYTE *pIAInputSignature; // Signature from VS or GS (if there is no VS)
  921. // or NULL if neither exists
  922. SIZE_T IAInputSignatureSize; // Singature size in bytes
  923. UINT StencilRef; // Specified in SetDepthStencilState()
  924. UINT SampleMask; // Specified in SetBlendState()
  925. FLOAT BlendFactor[4]; // Specified in SetBlendState()
  926. } D3D10_PASS_DESC;
  927. //----------------------------------------------------------------------------
  928. // D3D10_PASS_SHADER_DESC:
  929. //
  930. // Retrieved by ID3D10EffectPass::Get**ShaderDesc()
  931. //----------------------------------------------------------------------------
  932. typedef struct _D3D10_PASS_SHADER_DESC
  933. {
  934. ID3D10EffectShaderVariable *pShaderVariable; // The variable that this shader came from.
  935. // If this is an inline shader assignment,
  936. // the returned interface will be an
  937. // anonymous shader variable, which is
  938. // not retrievable any other way. It's
  939. // name in the variable description will
  940. // be "$Anonymous".
  941. // If there is no assignment of this type in
  942. // the pass block, pShaderVariable != NULL,
  943. // but pShaderVariable->IsValid() == FALSE.
  944. UINT ShaderIndex; // The element of pShaderVariable (if an array)
  945. // or 0 if not applicable
  946. } D3D10_PASS_SHADER_DESC;
  947. typedef interface ID3D10EffectPass ID3D10EffectPass;
  948. typedef interface ID3D10EffectPass *LPD3D10EFFECTPASS;
  949. // {5CFBEB89-1A06-46e0-B282-E3F9BFA36A54}
  950. DEFINE_GUID(IID_ID3D10EffectPass,
  951. 0x5cfbeb89, 0x1a06, 0x46e0, 0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54);
  952. #undef INTERFACE
  953. #define INTERFACE ID3D10EffectPass
  954. DECLARE_INTERFACE(ID3D10EffectPass)
  955. {
  956. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  957. STDMETHOD(GetDesc)(THIS_ D3D10_PASS_DESC *pDesc) PURE;
  958. STDMETHOD(GetVertexShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE;
  959. STDMETHOD(GetGeometryShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE;
  960. STDMETHOD(GetPixelShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *pDesc) PURE;
  961. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  962. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  963. STDMETHOD(Apply)(THIS_ UINT Flags) PURE;
  964. STDMETHOD(ComputeStateBlockMask)(THIS_ _Out_ D3D10_STATE_BLOCK_MASK *pStateBlockMask) PURE;
  965. };
  966. //////////////////////////////////////////////////////////////////////////////
  967. // ID3D10EffectTechnique /////////////////////////////////////////////////////
  968. //////////////////////////////////////////////////////////////////////////////
  969. //----------------------------------------------------------------------------
  970. // D3D10_TECHNIQUE_DESC:
  971. //
  972. // Retrieved by ID3D10EffectTechnique::GetDesc()
  973. //----------------------------------------------------------------------------
  974. typedef struct _D3D10_TECHNIQUE_DESC
  975. {
  976. LPCSTR Name; // Name of this technique (NULL if not anonymous)
  977. UINT Passes; // Number of passes contained within
  978. UINT Annotations; // Number of annotations on this technique
  979. } D3D10_TECHNIQUE_DESC;
  980. typedef interface ID3D10EffectTechnique ID3D10EffectTechnique;
  981. typedef interface ID3D10EffectTechnique *LPD3D10EFFECTTECHNIQUE;
  982. // {DB122CE8-D1C9-4292-B237-24ED3DE8B175}
  983. DEFINE_GUID(IID_ID3D10EffectTechnique,
  984. 0xdb122ce8, 0xd1c9, 0x4292, 0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75);
  985. #undef INTERFACE
  986. #define INTERFACE ID3D10EffectTechnique
  987. DECLARE_INTERFACE(ID3D10EffectTechnique)
  988. {
  989. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  990. STDMETHOD(GetDesc)(THIS_ D3D10_TECHNIQUE_DESC *pDesc) PURE;
  991. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByIndex)(THIS_ UINT Index) PURE;
  992. STDMETHOD_(ID3D10EffectVariable*, GetAnnotationByName)(THIS_ LPCSTR Name) PURE;
  993. STDMETHOD_(ID3D10EffectPass*, GetPassByIndex)(THIS_ UINT Index) PURE;
  994. STDMETHOD_(ID3D10EffectPass*, GetPassByName)(THIS_ LPCSTR Name) PURE;
  995. STDMETHOD(ComputeStateBlockMask)(THIS_ _Out_ D3D10_STATE_BLOCK_MASK *pStateBlockMask) PURE;
  996. };
  997. //////////////////////////////////////////////////////////////////////////////
  998. // ID3D10Effect //////////////////////////////////////////////////////////////
  999. //////////////////////////////////////////////////////////////////////////////
  1000. //----------------------------------------------------------------------------
  1001. // D3D10_EFFECT_DESC:
  1002. //
  1003. // Retrieved by ID3D10Effect::GetDesc()
  1004. //----------------------------------------------------------------------------
  1005. typedef struct _D3D10_EFFECT_DESC
  1006. {
  1007. BOOL IsChildEffect; // TRUE if this is a child effect,
  1008. // FALSE if this is standalone or an effect pool.
  1009. UINT ConstantBuffers; // Number of constant buffers in this effect,
  1010. // excluding the effect pool.
  1011. UINT SharedConstantBuffers; // Number of constant buffers shared in this
  1012. // effect's pool.
  1013. UINT GlobalVariables; // Number of global variables in this effect,
  1014. // excluding the effect pool.
  1015. UINT SharedGlobalVariables; // Number of global variables shared in this
  1016. // effect's pool.
  1017. UINT Techniques; // Number of techniques in this effect,
  1018. // excluding the effect pool.
  1019. } D3D10_EFFECT_DESC;
  1020. typedef interface ID3D10Effect ID3D10Effect;
  1021. typedef interface ID3D10Effect *LPD3D10EFFECT;
  1022. // {51B0CA8B-EC0B-4519-870D-8EE1CB5017C7}
  1023. DEFINE_GUID(IID_ID3D10Effect,
  1024. 0x51b0ca8b, 0xec0b, 0x4519, 0x87, 0xd, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7);
  1025. #undef INTERFACE
  1026. #define INTERFACE ID3D10Effect
  1027. DECLARE_INTERFACE_(ID3D10Effect, IUnknown)
  1028. {
  1029. // IUnknown
  1030. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
  1031. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  1032. STDMETHOD_(ULONG, Release)(THIS) PURE;
  1033. STDMETHOD_(BOOL, IsValid)(THIS) PURE;
  1034. STDMETHOD_(BOOL, IsPool)(THIS) PURE;
  1035. // Managing D3D Device
  1036. STDMETHOD(GetDevice)(THIS_ _Out_ ID3D10Device** ppDevice) PURE;
  1037. // New Reflection APIs
  1038. STDMETHOD(GetDesc)(THIS_ _Out_ D3D10_EFFECT_DESC *pDesc) PURE;
  1039. STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
  1040. STDMETHOD_(ID3D10EffectConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
  1041. STDMETHOD_(ID3D10EffectVariable*, GetVariableByIndex)(THIS_ UINT Index) PURE;
  1042. STDMETHOD_(ID3D10EffectVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
  1043. STDMETHOD_(ID3D10EffectVariable*, GetVariableBySemantic)(THIS_ LPCSTR Semantic) PURE;
  1044. STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByIndex)(THIS_ UINT Index) PURE;
  1045. STDMETHOD_(ID3D10EffectTechnique*, GetTechniqueByName)(THIS_ LPCSTR Name) PURE;
  1046. STDMETHOD(Optimize)(THIS) PURE;
  1047. STDMETHOD_(BOOL, IsOptimized)(THIS) PURE;
  1048. };
  1049. //////////////////////////////////////////////////////////////////////////////
  1050. // ID3D10EffectPool //////////////////////////////////////////////////////////
  1051. //////////////////////////////////////////////////////////////////////////////
  1052. typedef interface ID3D10EffectPool ID3D10EffectPool;
  1053. typedef interface ID3D10EffectPool *LPD3D10EFFECTPOOL;
  1054. // {9537AB04-3250-412e-8213-FCD2F8677933}
  1055. DEFINE_GUID(IID_ID3D10EffectPool,
  1056. 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
  1057. #undef INTERFACE
  1058. #define INTERFACE ID3D10EffectPool
  1059. DECLARE_INTERFACE_(ID3D10EffectPool, IUnknown)
  1060. {
  1061. // IUnknown
  1062. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
  1063. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  1064. STDMETHOD_(ULONG, Release)(THIS) PURE;
  1065. STDMETHOD_(ID3D10Effect*, AsEffect)(THIS) PURE;
  1066. // No public methods
  1067. };
  1068. //////////////////////////////////////////////////////////////////////////////
  1069. // APIs //////////////////////////////////////////////////////////////////////
  1070. //////////////////////////////////////////////////////////////////////////////
  1071. #ifdef __cplusplus
  1072. extern "C" {
  1073. #endif //__cplusplus
  1074. //----------------------------------------------------------------------------
  1075. // D3D10CreateEffectFromXXXX:
  1076. // --------------------------
  1077. // Creates an effect from a binary effect or file
  1078. //
  1079. // Parameters:
  1080. //
  1081. // [in]
  1082. //
  1083. //
  1084. // pData
  1085. // Blob of effect data, either ASCII (uncompiled, for D3D10CompileEffectFromMemory) or binary (compiled, for D3D10CreateEffect*)
  1086. // DataLength
  1087. // Length of the data blob
  1088. //
  1089. // pSrcFileName
  1090. // Name of the ASCII Effect file pData was obtained from
  1091. //
  1092. // pDefines
  1093. // Optional NULL-terminated array of preprocessor macro definitions.
  1094. // pInclude
  1095. // Optional interface pointer to use for handling #include directives.
  1096. // If this parameter is NULL, #includes will be honored when compiling
  1097. // from file, and will error when compiling from resource or memory.
  1098. // HLSLFlags
  1099. // Compilation flags pertaining to shaders and data types, honored by
  1100. // the HLSL compiler
  1101. // FXFlags
  1102. // Compilation flags pertaining to Effect compilation, honored
  1103. // by the Effect compiler
  1104. // pDevice
  1105. // Pointer to the D3D10 device on which to create Effect resources
  1106. // pEffectPool
  1107. // Pointer to an Effect pool to share variables with or NULL
  1108. //
  1109. // [out]
  1110. //
  1111. // ppEffect
  1112. // Address of the newly created Effect interface
  1113. // ppEffectPool
  1114. // Address of the newly created Effect pool interface
  1115. // ppErrors
  1116. // If non-NULL, address of a buffer with error messages that occurred
  1117. // during parsing or compilation
  1118. //
  1119. //----------------------------------------------------------------------------
  1120. HRESULT WINAPI D3D10CompileEffectFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, LPCSTR pSrcFileName, _In_opt_ CONST D3D10_SHADER_MACRO *pDefines,
  1121. _In_opt_ ID3D10Include *pInclude, UINT HLSLFlags, UINT FXFlags,
  1122. _Out_ ID3D10Blob **ppCompiledEffect, _Out_opt_ ID3D10Blob **ppErrors);
  1123. HRESULT WINAPI D3D10CreateEffectFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, UINT FXFlags, _In_ ID3D10Device *pDevice,
  1124. _In_opt_ ID3D10EffectPool *pEffectPool, _Out_ ID3D10Effect **ppEffect);
  1125. HRESULT WINAPI D3D10CreateEffectPoolFromMemory(_In_reads_bytes_(DataLength) void *pData, SIZE_T DataLength, UINT FXFlags, _In_ ID3D10Device *pDevice,
  1126. _Out_ ID3D10EffectPool **ppEffectPool);
  1127. //----------------------------------------------------------------------------
  1128. // D3D10DisassembleEffect:
  1129. // -----------------------
  1130. // Takes an effect interface, and returns a buffer containing text assembly.
  1131. //
  1132. // Parameters:
  1133. // pEffect
  1134. // Pointer to the runtime effect interface.
  1135. // EnableColorCode
  1136. // Emit HTML tags for color coding the output?
  1137. // ppDisassembly
  1138. // Returns a buffer containing the disassembled effect.
  1139. //----------------------------------------------------------------------------
  1140. HRESULT WINAPI D3D10DisassembleEffect(_In_ ID3D10Effect *pEffect, BOOL EnableColorCode, _Out_ ID3D10Blob **ppDisassembly);
  1141. #ifdef __cplusplus
  1142. }
  1143. #endif //__cplusplus
  1144. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
  1145. #pragma endregion
  1146. #endif //__D3D10EFFECT_H__