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