1 /***********************************************************************\ 2 * d3d10.d * 3 * * 4 * Windows API header module * 5 * * 6 * Placed into public domain * 7 \***********************************************************************/ 8 module win32.directx.d3d10; 9 version(Windows): 10 11 private import win32.windows; 12 13 public import win32.directx.dxgitype; 14 public import win32.directx.dxgi; 15 public import win32.directx.d3d10misc; 16 17 pragma(lib, "d3d10.lib"); 18 19 const D3D10_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff; 20 const D3D10_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff; 21 const D3D10_8BIT_INDEX_STRIP_CUT_VALUE = 0xff; 22 const D3D10_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9; 23 const D3D10_CLIP_OR_CULL_DISTANCE_COUNT = 8; 24 const D3D10_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2; 25 const D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14; 26 const D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4; 27 const D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32; 28 const D3D10_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15; 29 const D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4; 30 const D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15; 31 const D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1; 32 const D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1; 33 const D3D10_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64; 34 const D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4; 35 const D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1; 36 const D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1; 37 const D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1; 38 const D3D10_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32; 39 const D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1; 40 const D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128; 41 const D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1; 42 const D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1; 43 const D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128; 44 const D3D10_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1; 45 const D3D10_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16; 46 const D3D10_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1; 47 const D3D10_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1; 48 const D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT = 16; 49 const D3D10_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32; 50 const D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4; 51 const D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32; 52 const D3D10_COMMONSHADER_TEMP_REGISTER_COUNT = 4096; 53 const D3D10_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3; 54 const D3D10_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3; 55 const D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10; 56 const D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10; 57 const D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8; 58 const D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7; 59 const D3D10_DEFAULT_BLEND_FACTOR_ALPHA = 1.0f; 60 const D3D10_DEFAULT_BLEND_FACTOR_BLUE = 1.0f; 61 const D3D10_DEFAULT_BLEND_FACTOR_GREEN = 1.0f; 62 const D3D10_DEFAULT_BLEND_FACTOR_RED = 1.0f; 63 const D3D10_DEFAULT_BORDER_COLOR_COMPONENT = 0.0f; 64 const D3D10_DEFAULT_DEPTH_BIAS = 0; 65 const D3D10_DEFAULT_DEPTH_BIAS_CLAMP = 0.0f; 66 const D3D10_DEFAULT_MAX_ANISOTROPY = 16.0f; 67 const D3D10_DEFAULT_MIP_LOD_BIAS = 0.0f; 68 const D3D10_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0; 69 const D3D10_DEFAULT_SAMPLE_MASK = 0xffffffff; 70 const D3D10_DEFAULT_SCISSOR_ENDX = 0; 71 const D3D10_DEFAULT_SCISSOR_ENDY = 0; 72 const D3D10_DEFAULT_SCISSOR_STARTX = 0; 73 const D3D10_DEFAULT_SCISSOR_STARTY = 0; 74 const D3D10_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0f; 75 const D3D10_DEFAULT_STENCIL_READ_MASK = 0xff; 76 const D3D10_DEFAULT_STENCIL_REFERENCE = 0; 77 const D3D10_DEFAULT_STENCIL_WRITE_MASK = 0xff; 78 const D3D10_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0; 79 const D3D10_DEFAULT_VIEWPORT_HEIGHT = 0; 80 const D3D10_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0f; 81 const D3D10_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0f; 82 const D3D10_DEFAULT_VIEWPORT_TOPLEFTX = 0; 83 const D3D10_DEFAULT_VIEWPORT_TOPLEFTY = 0; 84 const D3D10_DEFAULT_VIEWPORT_WIDTH = 0; 85 const D3D10_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6; 86 const D3D10_FLOAT32_MAX = 3.402823466e+38f; 87 const D3D10_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6f; 88 const D3D10_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4f; 89 const D3D10_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0f; 90 const D3D10_FLOAT_TO_SRGB_OFFSET = 0.055f; 91 const D3D10_FLOAT_TO_SRGB_SCALE_1 = 12.92f; 92 const D3D10_FLOAT_TO_SRGB_SCALE_2 = 1.055f; 93 const D3D10_FLOAT_TO_SRGB_THRESHOLD = 0.0031308f; 94 const D3D10_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999f; 95 const D3D10_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999f; 96 const D3D10_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999f; 97 const D3D10_FTOU_INSTRUCTION_MIN_INPUT = 0.0f; 98 const D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1; 99 const D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32; 100 const D3D10_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1; 101 const D3D10_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2; 102 const D3D10_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1; 103 const D3D10_GS_INPUT_REGISTER_COMPONENTS = 4; 104 const D3D10_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 105 const D3D10_GS_INPUT_REGISTER_COUNT = 16; 106 const D3D10_GS_INPUT_REGISTER_READS_PER_INST = 2; 107 const D3D10_GS_INPUT_REGISTER_READ_PORTS = 1; 108 const D3D10_GS_INPUT_REGISTER_VERTICES = 6; 109 const D3D10_GS_OUTPUT_ELEMENTS = 32; 110 const D3D10_GS_OUTPUT_REGISTER_COMPONENTS = 4; 111 const D3D10_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 112 const D3D10_GS_OUTPUT_REGISTER_COUNT = 32; 113 const D3D10_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0; 114 const D3D10_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0; 115 const D3D10_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0; 116 const D3D10_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1; 117 const D3D10_IA_INSTANCE_ID_BIT_COUNT = 32; 118 const D3D10_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32; 119 const D3D10_IA_PRIMITIVE_ID_BIT_COUNT = 32; 120 const D3D10_IA_VERTEX_ID_BIT_COUNT = 32; 121 const D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 16; 122 const D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 64; 123 const D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 16; 124 const D3D10_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff; 125 const D3D10_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff; 126 const D3D10_LINEAR_GAMMA = 1.0f; 127 const D3D10_MAX_BORDER_COLOR_COMPONENT = 1.0f; 128 const D3D10_MAX_DEPTH = 1.0f; 129 const D3D10_MAX_MAXANISOTROPY = 16; 130 const D3D10_MAX_MULTISAMPLE_SAMPLE_COUNT = 32; 131 const D3D10_MAX_POSITION_VALUE = 3.402823466e+34f; 132 const D3D10_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17; 133 const D3D10_MIN_BORDER_COLOR_COMPONENT = 0.0f; 134 const D3D10_MIN_DEPTH = 0.0f; 135 const D3D10_MIN_MAXANISOTROPY = 0; 136 const D3D10_MIP_LOD_BIAS_MAX = 15.99f; 137 const D3D10_MIP_LOD_BIAS_MIN = -16.0f; 138 const D3D10_MIP_LOD_FRACTIONAL_BIT_COUNT = 6; 139 const D3D10_MIP_LOD_RANGE_BIT_COUNT = 8; 140 const D3D10_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4f; 141 const D3D10_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0; 142 const D3D10_PIXEL_ADDRESS_RANGE_BIT_COUNT = 13; 143 const D3D10_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15; 144 const D3D10_PS_FRONTFACING_DEFAULT_VALUE = 0xffffffff; 145 const D3D10_PS_FRONTFACING_FALSE_VALUE = 0; 146 const D3D10_PS_FRONTFACING_TRUE_VALUE = 0xffffffff; 147 const D3D10_PS_INPUT_REGISTER_COMPONENTS = 4; 148 const D3D10_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 149 const D3D10_PS_INPUT_REGISTER_COUNT = 32; 150 const D3D10_PS_INPUT_REGISTER_READS_PER_INST = 2; 151 const D3D10_PS_INPUT_REGISTER_READ_PORTS = 1; 152 const D3D10_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0f; 153 const D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1; 154 const D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32; 155 const D3D10_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1; 156 const D3D10_PS_OUTPUT_REGISTER_COMPONENTS = 4; 157 const D3D10_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 158 const D3D10_PS_OUTPUT_REGISTER_COUNT = 8; 159 const D3D10_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5f; 160 const D3D10_REQ_BLEND_OBJECT_COUNT_PER_CONTEXT = 4096; 161 const D3D10_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27; 162 const D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096; 163 const D3D10_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_CONTEXT = 4096; 164 const D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32; 165 const D3D10_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32; 166 const D3D10_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 8192; 167 const D3D10_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024; 168 const D3D10_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096; 169 const D3D10_REQ_MAXANISOTROPY = 16; 170 const D3D10_REQ_MIP_LEVELS = 14; 171 const D3D10_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048; 172 const D3D10_REQ_RASTERIZER_OBJECT_COUNT_PER_CONTEXT = 4096; 173 const D3D10_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 8192; 174 const D3D10_REQ_RESOURCE_SIZE_IN_MEGABYTES = 128; 175 const D3D10_REQ_RESOURCE_VIEW_COUNT_PER_CONTEXT_2_TO_EXP = 20; 176 const D3D10_REQ_SAMPLER_OBJECT_COUNT_PER_CONTEXT = 4096; 177 const D3D10_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 512; 178 const D3D10_REQ_TEXTURE1D_U_DIMENSION = 8192; 179 const D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 512; 180 const D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION = 8192; 181 const D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048; 182 const D3D10_REQ_TEXTURECUBE_DIMENSION = 8192; 183 const D3D10_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0; 184 const D3D10_SHADER_MAJOR_VERSION = 4; 185 const D3D10_SHADER_MINOR_VERSION = 0; 186 const D3D10_SHIFT_INSTRUCTION_PAD_VALUE = 0; 187 const D3D10_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5; 188 const D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT = 8; 189 const D3D10_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048; 190 const D3D10_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256; 191 const D3D10_SO_BUFFER_SLOT_COUNT = 4; 192 const D3D10_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff; 193 const D3D10_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1; 194 const D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64; 195 const D3D10_SRGB_GAMMA = 2.2f; 196 const D3D10_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92f; 197 const D3D10_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055f; 198 const D3D10_SRGB_TO_FLOAT_EXPONENT = 2.4f; 199 const D3D10_SRGB_TO_FLOAT_OFFSET = 0.055f; 200 const D3D10_SRGB_TO_FLOAT_THRESHOLD = 0.04045f; 201 const D3D10_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5f; 202 const D3D10_STANDARD_COMPONENT_BIT_COUNT = 32; 203 const D3D10_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64; 204 const D3D10_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4; 205 const D3D10_STANDARD_PIXEL_COMPONENT_COUNT = 128; 206 const D3D10_STANDARD_PIXEL_ELEMENT_COUNT = 32; 207 const D3D10_STANDARD_VECTOR_SIZE = 4; 208 const D3D10_STANDARD_VERTEX_ELEMENT_COUNT = 16; 209 const D3D10_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64; 210 const D3D10_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8; 211 const D3D10_SUBTEXEL_FRACTIONAL_BIT_COUNT = 6; 212 const D3D10_TEXEL_ADDRESS_RANGE_BIT_COUNT = 18; 213 const D3D10_UNBOUND_MEMORY_ACCESS_RESULT = 0; 214 const D3D10_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15; 215 const D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16; 216 const D3D10_VIEWPORT_BOUNDS_MAX = 16383; 217 const D3D10_VIEWPORT_BOUNDS_MIN = -16384; 218 const D3D10_VS_INPUT_REGISTER_COMPONENTS = 4; 219 const D3D10_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 220 const D3D10_VS_INPUT_REGISTER_COUNT = 16; 221 const D3D10_VS_INPUT_REGISTER_READS_PER_INST = 2; 222 const D3D10_VS_INPUT_REGISTER_READ_PORTS = 1; 223 const D3D10_VS_OUTPUT_REGISTER_COMPONENTS = 4; 224 const D3D10_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 225 const D3D10_VS_OUTPUT_REGISTER_COUNT = 16; 226 const D3D10_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10; 227 const D3D10_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25; 228 const D3D10_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25; 229 const D3D_MAJOR_VERSION = 10; 230 const D3D_MINOR_VERSION = 0; 231 const D3D_SPEC_DATE_DAY = 8; 232 const D3D_SPEC_DATE_MONTH = 8; 233 const D3D_SPEC_DATE_YEAR = 2006; 234 const D3D_SPEC_VERSION = 1.050005; 235 236 const _FACD3D10 = 0x879; 237 const _FACD3D10DEBUG = _FACD3D10 + 1; 238 239 HRESULT MAKE_D3D10_HRESULT(T)(T code) { 240 return MAKE_HRESULT(1, _FACD3D10, code); 241 } 242 243 HRESULT MAKE_D3D10_STATUS(T)(T code) { 244 return MAKE_HRESULT(0, _FACD3D10, code); 245 } 246 247 const D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS = MAKE_D3D10_HRESULT(1); 248 const D3D10_ERROR_FILE_NOT_FOUND = MAKE_D3D10_HRESULT(2); 249 250 enum D3D10_INPUT_CLASSIFICATION { 251 D3D10_INPUT_PER_VERTEX_DATA = 0, 252 D3D10_INPUT_PER_INSTANCE_DATA = 1 253 } 254 255 const D3D10_APPEND_ALIGNED_ELEMENT = 0xffffffff; 256 257 struct D3D10_INPUT_ELEMENT_DESC { 258 LPCSTR SemanticName; 259 UINT SemanticIndex; 260 DXGI_FORMAT Format; 261 UINT InputSlot; 262 UINT AlignedByteOffset; 263 D3D10_INPUT_CLASSIFICATION InputSlotClass; 264 UINT InstanceDataStepRate; 265 } 266 267 enum D3D10_FILL_MODE { 268 D3D10_FILL_WIREFRAME = 2, 269 D3D10_FILL_SOLID = 3 270 } 271 272 enum D3D10_PRIMITIVE_TOPOLOGY { 273 D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = 0, 274 D3D10_PRIMITIVE_TOPOLOGY_POINTLIST = 1, 275 D3D10_PRIMITIVE_TOPOLOGY_LINELIST = 2, 276 D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP = 3, 277 D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4, 278 D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5, 279 D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10, 280 D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11, 281 D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12, 282 D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13 283 } 284 285 enum D3D10_PRIMITIVE { 286 D3D10_PRIMITIVE_UNDEFINED = 0, 287 D3D10_PRIMITIVE_POINT = 1, 288 D3D10_PRIMITIVE_LINE = 2, 289 D3D10_PRIMITIVE_TRIANGLE = 3, 290 D3D10_PRIMITIVE_LINE_ADJ = 6, 291 D3D10_PRIMITIVE_TRIANGLE_ADJ = 7 292 } 293 294 enum D3D10_CULL_MODE { 295 D3D10_CULL_NONE = 1, 296 D3D10_CULL_FRONT, 297 D3D10_CULL_BACK 298 } 299 300 struct D3D10_SO_DECLARATION_ENTRY { 301 LPCSTR SemanticName; 302 UINT SemanticIndex; 303 BYTE StartComponent; 304 BYTE ComponentCount; 305 BYTE OutputSlot; 306 } 307 308 struct D3D10_VIEWPORT { 309 INT TopLeftX; 310 INT TopLeftY; 311 UINT Width; 312 UINT Height; 313 FLOAT MinDepth; 314 FLOAT MaxDepth; 315 } 316 317 enum D3D10_RESOURCE_DIMENSION { 318 D3D10_RESOURCE_DIMENSION_UNKNOWN = 0, 319 D3D10_RESOURCE_DIMENSION_BUFFER, 320 D3D10_RESOURCE_DIMENSION_TEXTURE1D, 321 D3D10_RESOURCE_DIMENSION_TEXTURE2D, 322 D3D10_RESOURCE_DIMENSION_TEXTURE3D 323 } 324 325 enum D3D10_SRV_DIMENSION { 326 D3D10_SRV_DIMENSION_UNKNOWN = 0, 327 D3D10_SRV_DIMENSION_BUFFER, 328 D3D10_SRV_DIMENSION_TEXTURE1D, 329 D3D10_SRV_DIMENSION_TEXTURE1DARRAY, 330 D3D10_SRV_DIMENSION_TEXTURE2D, 331 D3D10_SRV_DIMENSION_TEXTURE2DARRAY, 332 D3D10_SRV_DIMENSION_TEXTURE2DMS, 333 D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY, 334 D3D10_SRV_DIMENSION_TEXTURE3D, 335 D3D10_SRV_DIMENSION_TEXTURECUBE 336 } 337 338 enum D3D10_DSV_DIMENSION { 339 D3D10_DSV_DIMENSION_UNKNOWN = 0, 340 D3D10_DSV_DIMENSION_TEXTURE1D, 341 D3D10_DSV_DIMENSION_TEXTURE1DARRAY, 342 D3D10_DSV_DIMENSION_TEXTURE2D, 343 D3D10_DSV_DIMENSION_TEXTURE2DARRAY, 344 D3D10_DSV_DIMENSION_TEXTURE2DMS, 345 D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY6 346 } 347 348 enum D3D10_RTV_DIMENSION { 349 D3D10_RTV_DIMENSION_UNKNOWN = 0, 350 D3D10_RTV_DIMENSION_BUFFER, 351 D3D10_RTV_DIMENSION_TEXTURE1D, 352 D3D10_RTV_DIMENSION_TEXTURE1DARRAY, 353 D3D10_RTV_DIMENSION_TEXTURE2D, 354 D3D10_RTV_DIMENSION_TEXTURE2DARRAY, 355 D3D10_RTV_DIMENSION_TEXTURE2DMS, 356 D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY, 357 D3D10_RTV_DIMENSION_TEXTURE3D 358 } 359 360 enum D3D10_USAGE { 361 D3D10_USAGE_DEFAULT = 0, 362 D3D10_USAGE_IMMUTABLE, 363 D3D10_USAGE_DYNAMIC, 364 D3D10_USAGE_STAGING 365 } 366 367 enum D3D10_BIND_FLAG { 368 D3D10_BIND_VERTEX_BUFFER = 0x01, 369 D3D10_BIND_INDEX_BUFFER = 0x02, 370 D3D10_BIND_CONSTANT_BUFFER = 0x04, 371 D3D10_BIND_SHADER_RESOURCE = 0x08, 372 D3D10_BIND_STREAM_OUTPUT = 0x10, 373 D3D10_BIND_RENDER_TARGET = 0x20, 374 D3D10_BIND_DEPTH_STENCIL = 0x40 375 } 376 377 enum D3D10_CPU_ACCESS_FLAG { 378 D3D10_CPU_ACCESS_WRITE = 0x10000, 379 D3D10_CPU_ACCESS_READ = 0x20000 380 } 381 382 enum D3D10_RESOURCE_MISC_FLAG { 383 D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x01, 384 D3D10_RESOURCE_MISC_SHARED = 0x02, 385 D3D10_RESOURCE_MISC_TEXTURECUBE = 0x04 386 } 387 388 enum D3D10_MAP { 389 D3D10_MAP_READ = 1, 390 D3D10_MAP_WRITE, 391 D3D10_MAP_READ_WRITE, 392 D3D10_MAP_WRITE_DISCARD, 393 D3D10_MAP_WRITE_NO_OVERWRITE 394 } 395 396 enum D3D10_MAP_FLAG { 397 D3D10_MAP_FLAG_DO_NOT_WAIT = 0x100000 398 } 399 400 enum D3D10_RAISE_FLAG { 401 D3D10_RAISE_FLAG_DRIVER_INTERNAL_ERROR = 0x01 402 } 403 404 enum D3D10_CLEAR_FLAG { 405 D3D10_CLEAR_DEPTH = 0x01, 406 D3D10_CLEAR_STENCIL = 0x02 407 } 408 409 alias RECT D3D10_RECT; 410 411 struct D3D10_BOX { 412 UINT left; 413 UINT top; 414 UINT front; 415 UINT right; 416 UINT bottom; 417 UINT back; 418 } 419 420 extern (Windows) interface ID3D10DeviceChild : IUnknown { 421 //extern(Windows) : 422 void GetDevice(ID3D10Device* ppDevice); 423 HRESULT GetPrivateData(REFGUID guid, UINT *pDataSize, void *pData); 424 HRESULT SetPrivateData(REFGUID guid, UINT DataSize, void *pData); 425 HRESULT SetPrivateDataInterface(REFGUID guid, IUnknown pData); 426 } 427 428 enum D3D10_COMPARISON_FUNC { 429 D3D10_COMPARISON_NEVER = 1, 430 D3D10_COMPARISON_LESS, 431 D3D10_COMPARISON_EQUAL, 432 D3D10_COMPARISON_LESS_EQUAL, 433 D3D10_COMPARISON_GREATER, 434 D3D10_COMPARISON_NOT_EQUAL, 435 D3D10_COMPARISON_GREATER_EQUAL, 436 D3D10_COMPARISON_ALWAYS 437 } 438 439 enum D3D10_DEPTH_WRITE_MASK { 440 D3D10_DEPTH_WRITE_MASK_ZERO = 0, 441 D3D10_DEPTH_WRITE_MASK_ALL 442 } 443 444 enum D3D10_STENCIL_OP { 445 D3D10_STENCIL_OP_KEEP = 1, 446 D3D10_STENCIL_OP_ZERO, 447 D3D10_STENCIL_OP_REPLACE, 448 D3D10_STENCIL_OP_INCR_SAT, 449 D3D10_STENCIL_OP_DECR_SAT, 450 D3D10_STENCIL_OP_INVERT, 451 D3D10_STENCIL_OP_INCR, 452 D3D10_STENCIL_OP_DECR 453 } 454 455 struct D3D10_DEPTH_STENCILOP_DESC { 456 D3D10_STENCIL_OP StencilFailOp; 457 D3D10_STENCIL_OP StencilDepthFailOp; 458 D3D10_STENCIL_OP StencilPassOp; 459 D3D10_COMPARISON_FUNC StencilFunc; 460 } 461 462 struct D3D10_DEPTH_STENCIL_DESC { 463 BOOL DepthEnable; 464 D3D10_DEPTH_WRITE_MASK DepthWriteMask; 465 D3D10_COMPARISON_FUNC DepthFunc; 466 BOOL StencilEnable; 467 UINT8 StencilReadMask; 468 UINT8 StencilWriteMask; 469 D3D10_DEPTH_STENCILOP_DESC FrontFace; 470 D3D10_DEPTH_STENCILOP_DESC BackFace; 471 } 472 473 interface ID3D10DepthStencilState : ID3D10DeviceChild { 474 extern(Windows) : 475 void GetDesc(D3D10_DEPTH_STENCIL_DESC *pDesc); 476 } 477 478 enum D3D10_BLEND { 479 D3D10_BLEND_ZERO = 1, 480 D3D10_BLEND_ONE = 2, 481 D3D10_BLEND_SRC_COLOR = 3, 482 D3D10_BLEND_INV_SRC_COLOR = 4, 483 D3D10_BLEND_SRC_ALPHA = 5, 484 D3D10_BLEND_INV_SRC_ALPHA = 6, 485 D3D10_BLEND_DEST_ALPHA = 7, 486 D3D10_BLEND_INV_DEST_ALPHA = 8, 487 D3D10_BLEND_DEST_COLOR = 9, 488 D3D10_BLEND_INV_DEST_COLOR = 10, 489 D3D10_BLEND_SRC_ALPHA_SAT = 11, 490 D3D10_BLEND_BLEND_FACTOR = 14, 491 D3D10_BLEND_INV_BLEND_FACTOR = 15, 492 D3D10_BLEND_SRC1_COLOR = 16, 493 D3D10_BLEND_INV_SRC1_COLOR = 17, 494 D3D10_BLEND_SRC1_ALPHA = 18, 495 D3D10_BLEND_INV_SRC1_ALPHA = 19 496 } 497 498 enum D3D10_BLEND_OP { 499 D3D10_BLEND_OP_ADD = 1, 500 D3D10_BLEND_OP_SUBTRACT, 501 D3D10_BLEND_OP_REV_SUBTRACT, 502 D3D10_BLEND_OP_MIN, 503 D3D10_BLEND_OP_MAX 504 } 505 506 enum D3D10_COLOR_WRITE_ENABLE { 507 D3D10_COLOR_WRITE_ENABLE_RED = 1, 508 D3D10_COLOR_WRITE_ENABLE_GREEN = 2, 509 D3D10_COLOR_WRITE_ENABLE_BLUE = 4, 510 D3D10_COLOR_WRITE_ENABLE_ALPHA = 8, 511 D3D10_COLOR_WRITE_ENABLE_ALL = (((D3D10_COLOR_WRITE_ENABLE_RED | D3D10_COLOR_WRITE_ENABLE_GREEN) | D3D10_COLOR_WRITE_ENABLE_BLUE) | D3D10_COLOR_WRITE_ENABLE_ALPHA) 512 } 513 514 struct D3D10_BLEND_DESC { 515 BOOL AlphaToCoverageEnable; 516 BOOL[8] BlendEnable; 517 D3D10_BLEND SrcBlend; 518 D3D10_BLEND DestBlend; 519 D3D10_BLEND_OP BlendOp; 520 D3D10_BLEND SrcBlendAlpha; 521 D3D10_BLEND DestBlendAlpha; 522 D3D10_BLEND_OP BlendOpAlpha; 523 UINT8[8] RenderTargetWriteMask; 524 } 525 526 interface ID3D10BlendState : ID3D10DeviceChild { 527 extern(Windows) : 528 void GetDesc(D3D10_BLEND_DESC *pDesc); 529 } 530 531 struct D3D10_RASTERIZER_DESC { 532 D3D10_FILL_MODE FillMode; 533 D3D10_CULL_MODE CullMode; 534 BOOL FrontCounterClockwise; 535 INT DepthBias; 536 FLOAT DepthBiasClamp; 537 FLOAT SlopeScaledDepthBias; 538 BOOL DepthClipEnable; 539 BOOL ScissorEnable; 540 BOOL MultisampleEnable; 541 BOOL AntialiasedLineEnable; 542 } 543 544 interface ID3D10RasterizerState : ID3D10DeviceChild { 545 extern(Windows) : 546 void GetDesc(D3D10_RASTERIZER_DESC *pDesc); 547 } 548 549 UINT D3D10CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT MipLevels) { 550 return MipSlice + ArraySlice * MipLevels; 551 } 552 553 struct D3D10_SUBRESOURCE_DATA { 554 void *pSysMem; 555 UINT SysMemPitch; 556 UINT SysMemSlicePitch; 557 } 558 559 interface ID3D10Resource : ID3D10DeviceChild { 560 extern(Windows) : 561 void GetType(D3D10_RESOURCE_DIMENSION *rType); 562 void SetEvictionPriority(UINT EvictionPriority); 563 UINT GetEvictionPriority(); 564 } 565 566 struct D3D10_BUFFER_DESC { 567 UINT ByteWidth; 568 D3D10_USAGE Usage; 569 UINT BindFlags; 570 UINT CPUAccessFlags; 571 UINT MiscFlags; 572 } 573 574 interface ID3D10Buffer : ID3D10Resource { 575 extern(Windows) : 576 HRESULT Map(D3D10_MAP MapType, UINT MapFlags, void **ppData); 577 void Unmap(); 578 void GetDesc(D3D10_BUFFER_DESC *pDesc); 579 } 580 581 struct D3D10_TEXTURE1D_DESC { 582 UINT Width; 583 UINT MipLevels; 584 UINT ArraySize; 585 DXGI_FORMAT Format; 586 D3D10_USAGE Usage; 587 UINT BindFlags; 588 UINT CPUAccessFlags; 589 UINT MiscFlags; 590 } 591 592 interface ID3D10Texture1D : ID3D10Resource { 593 extern(Windows) : 594 HRESULT Map(UINT Subresource, D3D10_MAP MapType, UINT MapFlags, void **ppData); 595 void Unmap(UINT Subresource); 596 void GetDesc(D3D10_TEXTURE1D_DESC *pDesc); 597 } 598 599 struct D3D10_TEXTURE2D_DESC { 600 UINT Width; 601 UINT Height; 602 UINT MipLevels; 603 UINT ArraySize; 604 DXGI_FORMAT Format; 605 DXGI_SAMPLE_DESC SampleDesc; 606 D3D10_USAGE Usage; 607 UINT BindFlags; 608 UINT CPUAccessFlags; 609 UINT MiscFlags; 610 } 611 612 struct D3D10_MAPPED_TEXTURE2D { 613 void *pData; 614 UINT RowPitch; 615 } 616 617 interface ID3D10Texture2D : ID3D10Resource { 618 extern(Windows) : 619 HRESULT Map(UINT Subresource, D3D10_MAP MapType, UINT MapFlags, D3D10_MAPPED_TEXTURE2D *pMappedTex2D); 620 void Unmap(UINT Subresource); 621 void GetDesc(D3D10_TEXTURE2D_DESC *pDesc); 622 } 623 624 struct D3D10_TEXTURE3D_DESC { 625 UINT Width; 626 UINT Height; 627 UINT Depth; 628 UINT MipLevels; 629 DXGI_FORMAT Format; 630 D3D10_USAGE Usage; 631 UINT BindFlags; 632 UINT CPUAccessFlags; 633 UINT MiscFlags; 634 } 635 636 struct D3D10_MAPPED_TEXTURE3D { 637 void *pData; 638 UINT RowPitch; 639 UINT DepthPitch; 640 } 641 642 interface ID3D10Texture3D : ID3D10Resource { 643 extern(Windows) : 644 HRESULT Map(UINT Subresource, D3D10_MAP MapType, UINT MapFlags, D3D10_MAPPED_TEXTURE3D *pMappedTex3D); 645 void Unmap(UINT Subresource); 646 void GetDesc(D3D10_TEXTURE3D_DESC *pDesc); 647 } 648 649 enum D3D10_TEXTURECUBE_FACE { 650 D3D10_TEXTURECUBE_FACE_POSITIVE_X = 0, 651 D3D10_TEXTURECUBE_FACE_NEGATIVE_X, 652 D3D10_TEXTURECUBE_FACE_POSITIVE_Y, 653 D3D10_TEXTURECUBE_FACE_NEGATIVE_Y, 654 D3D10_TEXTURECUBE_FACE_POSITIVE_Z, 655 D3D10_TEXTURECUBE_FACE_NEGATIVE_Z 656 } 657 658 interface ID3D10View : ID3D10DeviceChild { 659 extern(Windows) : 660 void GetResource(ID3D10Resource *ppResource); 661 } 662 663 struct D3D10_BUFFER_SRV { 664 UINT ElementOffset; 665 UINT ElementWidth; 666 } 667 668 struct D3D10_TEX1D_SRV { 669 UINT MostDetailedMip; 670 UINT MipLevels; 671 } 672 673 struct D3D10_TEX1D_ARRAY_SRV { 674 UINT MostDetailedMip; 675 UINT MipLevels; 676 UINT FirstArraySlice; 677 UINT ArraySize; 678 } 679 680 struct D3D10_TEX2D_SRV { 681 UINT MostDetailedMip; 682 UINT MipLevels; 683 } 684 685 struct D3D10_TEX2D_ARRAY_SRV { 686 UINT MostDetailedMip; 687 UINT MipLevels; 688 UINT FirstArraySlice; 689 UINT ArraySize; 690 } 691 692 struct D3D10_TEX3D_SRV { 693 UINT MostDetailedMip; 694 UINT MipLevels; 695 } 696 697 struct D3D10_TEXCUBE_SRV { 698 UINT MostDetailedMip; 699 UINT MipLevels; 700 } 701 702 struct D3D10_TEX2DMS_SRV { 703 UINT UnusedField_NothingToDefine; 704 } 705 706 struct D3D10_TEX2DMS_ARRAY_SRV { 707 UINT FirstArraySlice; 708 UINT ArraySize; 709 } 710 711 struct D3D10_SHADER_RESOURCE_VIEW_DESC { 712 DXGI_FORMAT Format; 713 D3D10_SRV_DIMENSION ViewDimension; 714 union { 715 D3D10_BUFFER_SRV Buffer; 716 D3D10_TEX1D_SRV Texture1D; 717 D3D10_TEX1D_ARRAY_SRV Texture1DArray; 718 D3D10_TEX2D_SRV Texture2D; 719 D3D10_TEX2D_ARRAY_SRV Texture2DArray; 720 D3D10_TEX2DMS_SRV Texture2DMS; 721 D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray; 722 D3D10_TEX3D_SRV Texture3D; 723 D3D10_TEXCUBE_SRV TextureCube; 724 } 725 } 726 727 interface ID3D10ShaderResourceView : ID3D10View { 728 extern(Windows) : 729 void GetDesc(D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc); 730 } 731 732 struct D3D10_BUFFER_RTV { 733 UINT ElementOffset; 734 UINT ElementWidth; 735 } 736 737 struct D3D10_TEX1D_RTV { 738 UINT MipSlice; 739 } 740 741 struct D3D10_TEX1D_ARRAY_RTV { 742 UINT MipSlice; 743 UINT FirstArraySlice; 744 UINT ArraySize; 745 } 746 747 struct D3D10_TEX2D_RTV { 748 UINT MipSlice; 749 } 750 751 struct D3D10_TEX2DMS_RTV { 752 UINT UnusedField_NothingToDefine; 753 } 754 755 struct D3D10_TEX2D_ARRAY_RTV { 756 UINT MipSlice; 757 UINT FirstArraySlice; 758 UINT ArraySize; 759 } 760 761 struct D3D10_TEX2DMS_ARRAY_RTV { 762 UINT FirstArraySlice; 763 UINT ArraySize; 764 } 765 766 struct D3D10_TEX3D_RTV { 767 UINT MipSlice; 768 UINT FirstWSlice; 769 UINT WSize; 770 } 771 772 struct D3D10_RENDER_TARGET_VIEW_DESC { 773 DXGI_FORMAT Format; 774 D3D10_RTV_DIMENSION ViewDimension; 775 union { 776 D3D10_BUFFER_RTV Buffer; 777 D3D10_TEX1D_RTV Texture1D; 778 D3D10_TEX1D_ARRAY_RTV Texture1DArray; 779 D3D10_TEX2D_RTV Texture2D; 780 D3D10_TEX2D_ARRAY_RTV Texture2DArray; 781 D3D10_TEX2DMS_RTV Texture2DMS; 782 D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray; 783 D3D10_TEX3D_RTV Texture3D; 784 } 785 } 786 787 interface ID3D10RenderTargetView : ID3D10View { 788 extern(Windows) : 789 void GetDesc(D3D10_RENDER_TARGET_VIEW_DESC *pDesc); 790 } 791 792 struct D3D10_TEX1D_DSV { 793 UINT MipSlice; 794 } 795 796 struct D3D10_TEX1D_ARRAY_DSV { 797 UINT MipSlice; 798 UINT FirstArraySlice; 799 UINT ArraySize; 800 } 801 802 struct D3D10_TEX2D_DSV { 803 UINT MipSlice; 804 } 805 806 struct D3D10_TEX2D_ARRAY_DSV { 807 UINT MipSlice; 808 UINT FirstArraySlice; 809 UINT ArraySize; 810 } 811 812 struct D3D10_TEX2DMS_DSV { 813 UINT UnusedField_NothingToDefine; 814 } 815 816 struct D3D10_TEX2DMS_ARRAY_DSV { 817 UINT FirstArraySlice; 818 UINT ArraySize; 819 } 820 821 struct D3D10_DEPTH_STENCIL_VIEW_DESC { 822 DXGI_FORMAT Format; 823 D3D10_DSV_DIMENSION ViewDimension; 824 union { 825 D3D10_TEX1D_DSV Texture1D; 826 D3D10_TEX1D_ARRAY_DSV Texture1DArray; 827 D3D10_TEX2D_DSV Texture2D; 828 D3D10_TEX2D_ARRAY_DSV Texture2DArray; 829 D3D10_TEX2DMS_DSV Texture2DMS; 830 D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray; 831 } 832 } 833 834 interface ID3D10DepthStencilView : ID3D10View { 835 extern(Windows) : 836 void GetDesc(D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc); 837 } 838 839 interface ID3D10VertexShader : ID3D10DeviceChild { } 840 841 interface ID3D10GeometryShader : ID3D10DeviceChild { } 842 843 interface ID3D10PixelShader : ID3D10DeviceChild { } 844 845 interface ID3D10InputLayout : ID3D10DeviceChild { } 846 847 enum D3D10_FILTER { 848 D3D10_FILTER_MIN_MAG_MIP_POINT = 0x00, 849 D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01, 850 D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04, 851 D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05, 852 D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, 853 D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, 854 D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, 855 D3D10_FILTER_MIN_MAG_MIP_LINEAR = 0x15, 856 D3D10_FILTER_ANISOTROPIC = 0x55, 857 D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, 858 D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, 859 D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, 860 D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, 861 D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, 862 D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, 863 D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, 864 D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, 865 D3D10_FILTER_COMPARISON_ANISOTROPIC = 0xd5, 866 D3D10_FILTER_TEXT_1BIT = 0x80000000 867 } 868 869 870 enum D3D10_FILTER_TYPE { 871 D3D10_FILTER_TYPE_POINT = 0, 872 D3D10_FILTER_TYPE_LINEAR 873 } 874 875 const D3D10_FILTER_TYPE_MASK = 0x03; 876 877 const D3D10_MIN_FILTER_SHIFT = 4; 878 879 const D3D10_MAG_FILTER_SHIFT = 2; 880 881 const D3D10_MIP_FILTER_SHIFT = 0; 882 883 const D3D10_COMPARISON_FILTERING_BIT = 0x80; 884 885 const D3D10_ANISOTROPIC_FILTERING_BIT = 0x40; 886 887 const D3D10_TEXT_1BIT_BIT = 0x80000000; 888 889 D3D10_FILTER D3D10_ENCODE_BASIC_FILTER(int min, int mag, int mip, bool bComparison) { 890 return cast(D3D10_FILTER)(((bComparison) ? D3D10_COMPARISON_FILTERING_BIT : 0) | 891 ((min & D3D10_FILTER_TYPE_MASK) << D3D10_MIN_FILTER_SHIFT) | 892 ((mag & D3D10_FILTER_TYPE_MASK) << D3D10_MAG_FILTER_SHIFT) | 893 ((mip & D3D10_FILTER_TYPE_MASK) << D3D10_MIP_FILTER_SHIFT)); 894 } 895 896 D3D10_FILTER D3D10_ENCODE_ANISOTROPIC_FILTER(bool bComparison) { 897 return cast(D3D10_FILTER)(D3D10_ANISOTROPIC_FILTERING_BIT | 898 D3D10_ENCODE_BASIC_FILTER(D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR, 899 D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR, D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR, 900 bComparison)); 901 } 902 903 D3D10_FILTER_TYPE D3D10_DECODE_MIN_FILTER(D3D10_FILTER d3d10Filter) { 904 return cast(D3D10_FILTER_TYPE)((d3d10Filter >> D3D10_MIN_FILTER_SHIFT) & D3D10_FILTER_TYPE_MASK); 905 } 906 907 D3D10_FILTER_TYPE D3D10_DECODE_MAG_FILTER(D3D10_FILTER d3d10Filter) { 908 return cast(D3D10_FILTER_TYPE)((d3d10Filter >> D3D10_MAG_FILTER_SHIFT) & D3D10_FILTER_TYPE_MASK); 909 } 910 911 D3D10_FILTER_TYPE D3D10_DECODE_MIP_FILTER(D3D10_FILTER d3d10Filter) { 912 return cast(D3D10_FILTER_TYPE)((d3d10Filter >> D3D10_MIP_FILTER_SHIFT) & D3D10_FILTER_TYPE_MASK); 913 } 914 915 bool D3D10_DECODE_IS_COMPARISON_FILTER(D3D10_FILTER d3d10Filter) { 916 return (d3d10Filter & D3D10_COMPARISON_FILTERING_BIT) == D3D10_COMPARISON_FILTERING_BIT; 917 } 918 919 bool D3D10_DECODE_IS_ANISOTROPIC_FILTER(D3D10_FILTER d3d10Filter) { 920 return ((d3d10Filter & D3D10_ANISOTROPIC_FILTERING_BIT) && 921 (D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MIN_FILTER(d3d10Filter)) && 922 (D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MAG_FILTER(d3d10Filter)) && 923 (D3D10_FILTER_TYPE.D3D10_FILTER_TYPE_LINEAR == D3D10_DECODE_MIP_FILTER(d3d10Filter))); 924 } 925 926 bool D3D10_DECODE_IS_TEXT_1BIT_FILTER(D3D10_FILTER d3d10Filter) { 927 return d3d10Filter == D3D10_TEXT_1BIT_BIT; 928 } 929 930 enum D3D10_TEXTURE_ADDRESS_MODE { 931 D3D10_TEXTURE_ADDRESS_WRAP = 1, 932 D3D10_TEXTURE_ADDRESS_MIRROR, 933 D3D10_TEXTURE_ADDRESS_CLAMP, 934 D3D10_TEXTURE_ADDRESS_BORDER, 935 D3D10_TEXTURE_ADDRESS_MIRROR_ONCE 936 } 937 938 struct D3D10_SAMPLER_DESC { 939 D3D10_FILTER Filter; 940 D3D10_TEXTURE_ADDRESS_MODE AddressU; 941 D3D10_TEXTURE_ADDRESS_MODE AddressV; 942 D3D10_TEXTURE_ADDRESS_MODE AddressW; 943 FLOAT MipLODBias; 944 UINT MaxAnisotropy; 945 D3D10_COMPARISON_FUNC ComparisonFunc; 946 FLOAT[4] BorderColor; 947 FLOAT MinLOD; 948 FLOAT MaxLOD; 949 } 950 951 interface ID3D10SamplerState : ID3D10DeviceChild { 952 extern(Windows) : 953 void GetDesc(D3D10_SAMPLER_DESC *pDesc); 954 } 955 956 enum D3D10_FORMAT_SUPPORT { 957 D3D10_FORMAT_SUPPORT_BUFFER = 0x000001, 958 D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x000002, 959 D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x000004, 960 D3D10_FORMAT_SUPPORT_SO_BUFFER = 0x000008, 961 D3D10_FORMAT_SUPPORT_TEXTURE1D = 0x000010, 962 D3D10_FORMAT_SUPPORT_TEXTURE2D = 0x000020, 963 D3D10_FORMAT_SUPPORT_TEXTURE3D = 0x000040, 964 D3D10_FORMAT_SUPPORT_TEXTURECUBE = 0x000080, 965 D3D10_FORMAT_SUPPORT_SHADER_LOAD = 0x000100, 966 D3D10_FORMAT_SUPPORT_SHADER_SAMPLE = 0x000200, 967 D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x000400, 968 D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x000800, 969 D3D10_FORMAT_SUPPORT_MIP = 0x001000, 970 D3D10_FORMAT_SUPPORT_MIP_AUTOGEN = 0x002000, 971 D3D10_FORMAT_SUPPORT_RENDER_TARGET = 0x004000, 972 D3D10_FORMAT_SUPPORT_BLENDABLE = 0x008000, 973 D3D10_FORMAT_SUPPORT_DEPTH_STENCIL = 0x010000, 974 D3D10_FORMAT_SUPPORT_CPU_LOCKABLE = 0x020000, 975 D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x040000, 976 D3D10_FORMAT_SUPPORT_DISPLAY = 0x080000, 977 D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000, 978 D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000, 979 D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000, 980 D3D10_FORMAT_SUPPORT_SHADER_GATHER = 0x800000 981 } 982 983 interface ID3D10Asynchronous : ID3D10DeviceChild { 984 extern(Windows) : 985 void Begin(); 986 void End(); 987 HRESULT GetData(void *pData, UINT DataSize, UINT GetDataFlags); 988 UINT GetDataSize(); 989 } 990 991 enum D3D10_ASYNC_GETDATA_FLAG { 992 D3D10_ASYNC_GETDATA_DONOTFLUSH = 0x1 993 } 994 995 enum D3D10_QUERY { 996 D3D10_QUERY_EVENT = 0, 997 D3D10_QUERY_OCCLUSION = (D3D10_QUERY_EVENT + 1), 998 D3D10_QUERY_TIMESTAMP = (D3D10_QUERY_OCCLUSION + 1), 999 D3D10_QUERY_TIMESTAMP_DISJOINT = (D3D10_QUERY_TIMESTAMP + 1), 1000 D3D10_QUERY_PIPELINE_STATISTICS = (D3D10_QUERY_TIMESTAMP_DISJOINT + 1), 1001 D3D10_QUERY_OCCLUSION_PREDICATE = (D3D10_QUERY_PIPELINE_STATISTICS + 1), 1002 D3D10_QUERY_SO_STATISTICS = (D3D10_QUERY_OCCLUSION_PREDICATE + 1), 1003 D3D10_QUERY_SO_OVERFLOW_PREDICATE = (D3D10_QUERY_SO_STATISTICS + 1) 1004 } 1005 1006 enum D3D10_QUERY_MISC_FLAG { 1007 D3D10_QUERY_MISC_PREDICATEHINT = 0x01 1008 } 1009 1010 struct D3D10_QUERY_DESC { 1011 D3D10_QUERY Query; 1012 UINT MiscFlags; 1013 } 1014 1015 interface ID3D10Query : ID3D10Asynchronous { 1016 extern(Windows) : 1017 void GetDesc(D3D10_QUERY_DESC *pDesc); 1018 } 1019 1020 interface ID3D10Predicate : ID3D10Query { } 1021 1022 struct D3D10_QUERY_DATA_TIMESTAMP_DISJOINT { 1023 UINT64 Frequency; 1024 BOOL Disjoint; 1025 } 1026 1027 struct D3D10_QUERY_DATA_PIPELINE_STATISTICS { 1028 UINT64 IAVertices; 1029 UINT64 IAPrimitives; 1030 UINT64 VSInvocations; 1031 UINT64 GSInvocations; 1032 UINT64 GSPrimitives; 1033 UINT64 CInvocations; 1034 UINT64 CPrimitives; 1035 UINT64 PSInvocations; 1036 } 1037 1038 struct D3D10_QUERY_DATA_SO_STATISTICS { 1039 UINT64 NumPrimitivesWritten; 1040 UINT64 PrimitivesStorageNeeded; 1041 } 1042 1043 enum D3D10_COUNTER { 1044 D3D10_COUNTER_GPU_IDLE = 0, 1045 D3D10_COUNTER_VERTEX_PROCESSING = (D3D10_COUNTER_GPU_IDLE + 1), 1046 D3D10_COUNTER_GEOMETRY_PROCESSING = (D3D10_COUNTER_VERTEX_PROCESSING + 1), 1047 D3D10_COUNTER_PIXEL_PROCESSING = (D3D10_COUNTER_GEOMETRY_PROCESSING + 1), 1048 D3D10_COUNTER_OTHER_GPU_PROCESSING = (D3D10_COUNTER_PIXEL_PROCESSING + 1), 1049 D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION = (D3D10_COUNTER_OTHER_GPU_PROCESSING + 1), 1050 D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION = (D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION + 1), 1051 D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION = (D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION + 1), 1052 D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION = (D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION + 1), 1053 D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION = (D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION + 1), 1054 D3D10_COUNTER_VS_MEMORY_LIMITED = (D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION + 1), 1055 D3D10_COUNTER_VS_COMPUTATION_LIMITED = (D3D10_COUNTER_VS_MEMORY_LIMITED + 1), 1056 D3D10_COUNTER_GS_MEMORY_LIMITED = (D3D10_COUNTER_VS_COMPUTATION_LIMITED + 1), 1057 D3D10_COUNTER_GS_COMPUTATION_LIMITED = (D3D10_COUNTER_GS_MEMORY_LIMITED + 1), 1058 D3D10_COUNTER_PS_MEMORY_LIMITED = (D3D10_COUNTER_GS_COMPUTATION_LIMITED + 1), 1059 D3D10_COUNTER_PS_COMPUTATION_LIMITED = (D3D10_COUNTER_PS_MEMORY_LIMITED + 1), 1060 D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE = (D3D10_COUNTER_PS_COMPUTATION_LIMITED + 1), 1061 D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE = (D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE + 1), 1062 D3D10_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000 1063 } 1064 1065 enum D3D10_COUNTER_TYPE { 1066 D3D10_COUNTER_TYPE_FLOAT32 = 0, 1067 D3D10_COUNTER_TYPE_UINT16 = (D3D10_COUNTER_TYPE_FLOAT32 + 1), 1068 D3D10_COUNTER_TYPE_UINT32 = (D3D10_COUNTER_TYPE_UINT16 + 1), 1069 D3D10_COUNTER_TYPE_UINT64 = (D3D10_COUNTER_TYPE_UINT32 + 1) 1070 } 1071 1072 struct D3D10_COUNTER_DESC { 1073 D3D10_COUNTER Counter; 1074 UINT MiscFlags; 1075 } 1076 1077 struct D3D10_COUNTER_INFO { 1078 D3D10_COUNTER LastDeviceDependentCounter; 1079 UINT NumSimultaneousCounters; 1080 UINT8 NumDetectableParallelUnits; 1081 } 1082 1083 interface ID3D10Counter : ID3D10Asynchronous { 1084 extern(Windows) : 1085 void GetDesc(D3D10_COUNTER_DESC *pDesc); 1086 } 1087 1088 interface ID3D10Device : IUnknown { 1089 extern(Windows) : 1090 void VSSetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1091 void PSSetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1092 void PSSetShader(ID3D10PixelShader pPixelShader); 1093 void PSSetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1094 void VSSetShader(ID3D10VertexShader pVertexShader); 1095 void DrawIndexed(UINT IndexCount, UINT StartIndexLocation, INT BaseVertexLocation); 1096 void Draw(UINT VertexCount, UINT StartVertexLocation); 1097 void PSSetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1098 void IASetInputLayout(ID3D10InputLayout pInputLayout); 1099 void IASetVertexBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppVertexBuffers, UINT* pStrides, UINT* pOffsets); 1100 void IASetIndexBuffer(ID3D10Buffer pIndexBuffer, DXGI_FORMAT Format, UINT Offset); 1101 void DrawIndexedInstanced(UINT IndexCountPerInstance, UINT InstanceCount, UINT StartIndexLocation, INT BaseVertexLocation, UINT StartInstanceLocation); 1102 void DrawInstanced(UINT VertexCountPerInstance, UINT InstanceCount, UINT StartVertexLocation, UINT StartInstanceLocation); 1103 void GSSetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1104 void GSSetShader(ID3D10GeometryShader pShader); 1105 void IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY Topology); 1106 void VSSetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1107 void VSSetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1108 void SetPredication(ID3D10Predicate pPredicate, BOOL PredicateValue); 1109 void GSSetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1110 void GSSetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1111 void OMSetRenderTargets(UINT NumViews, ID3D10RenderTargetView* ppRenderTargetViews, ID3D10DepthStencilView pDepthStencilView); 1112 void OMSetBlendState(ID3D10BlendState pBlendState, FLOAT[4] BlendFactor, UINT SampleMask); 1113 void OMSetDepthStencilState(ID3D10DepthStencilState pDepthStencilState, UINT StencilRef); 1114 void SOSetTargets(UINT NumBuffers, ID3D10Buffer* ppSOTargets, UINT* pOffsets); 1115 void DrawAuto(); 1116 void RSSetState(ID3D10RasterizerState pRasterizerState); 1117 void RSSetViewports(UINT NumViewports, D3D10_VIEWPORT* pViewports); 1118 void RSSetScissorRects(UINT NumRects, D3D10_RECT* pRects); 1119 void CopySubresourceRegion(ID3D10Resource pDstResource, UINT DstSubresource, UINT DstX, UINT DstY, UINT DstZ, ID3D10Resource pSrcResource, UINT SrcSubresource, D3D10_BOX* pSrcBox); 1120 void CopyResource(ID3D10Resource pDstResource, ID3D10Resource pSrcResource); 1121 void UpdateSubresource(ID3D10Resource pDstResource, UINT DstSubresource, D3D10_BOX* pDstBox, void* pSrcData, UINT SrcRowPitch, UINT SrcDepthPitch); 1122 void ClearRenderTargetView(ID3D10RenderTargetView pRenderTargetView, FLOAT[4]* ColorRGBA); 1123 void ClearDepthStencilView(ID3D10DepthStencilView pDepthStencilView, UINT ClearFlags, FLOAT Depth, UINT8 Stencil); 1124 void GenerateMips(ID3D10ShaderResourceView pShaderResourceView); 1125 void ResolveSubresource(ID3D10Resource pDstResource, UINT DstSubresource, ID3D10Resource pSrcResource, UINT SrcSubresource, DXGI_FORMAT Format); 1126 void VSGetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1127 void PSGetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1128 void PSGetShader(ID3D10PixelShader* ppPixelShader); 1129 void PSGetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1130 void VSGetShader(ID3D10VertexShader* ppVertexShader); 1131 void PSGetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1132 void IAGetInputLayout(ID3D10InputLayout* ppInputLayout); 1133 void IAGetVertexBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppVertexBuffers, UINT* pStrides, UINT* pOffsets); 1134 void IAGetIndexBuffer(ID3D10Buffer* pIndexBuffer, DXGI_FORMAT* Format, UINT* Offset); 1135 void GSGetConstantBuffers(UINT StartSlot, UINT NumBuffers, ID3D10Buffer* ppConstantBuffers); 1136 void GSGetShader(ID3D10GeometryShader* ppGeometryShader); 1137 void IAGetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY* pTopology); 1138 void VSGetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1139 void VSGetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1140 void GetPredication(ID3D10Predicate* ppPredicate, BOOL* pPredicateValue); 1141 void GSGetShaderResources(UINT StartSlot, UINT NumViews, ID3D10ShaderResourceView* ppShaderResourceViews); 1142 void GSGetSamplers(UINT StartSlot, UINT NumSamplers, ID3D10SamplerState* ppSamplers); 1143 void OMGetRenderTargets(UINT NumViews, ID3D10RenderTargetView* ppRenderTargetViews, ID3D10DepthStencilView* ppDepthStencilView); 1144 void OMGetBlendState(ID3D10BlendState* ppBlendState, FLOAT BlendFactor[ 4 ], UINT* pSampleMask); 1145 void OMGetDepthStencilState(ID3D10DepthStencilState* ppDepthStencilState, UINT* pStencilRef); 1146 void SOGetTargets(UINT NumBuffers, ID3D10Buffer* ppSOTargets, UINT* pOffsets); 1147 void RSGetState(ID3D10RasterizerState* ppRasterizerState); 1148 void RSGetViewports(UINT* NumViewports, D3D10_VIEWPORT* pViewports); 1149 void RSGetScissorRects(UINT* NumRects, D3D10_RECT* pRects); 1150 HRESULT GetDeviceRemovedReason(); 1151 HRESULT SetExceptionMode(UINT RaiseFlags); 1152 UINT GetExceptionMode(); 1153 HRESULT GetPrivateData(REFGUID guid, UINT* pDataSize, void* pData); 1154 HRESULT SetPrivateData(REFGUID guid, UINT DataSize, void* pData); 1155 HRESULT SetPrivateDataInterface(REFGUID guid, IUnknown pData); 1156 void ClearState(); 1157 void Flush(); 1158 HRESULT CreateBuffer(D3D10_BUFFER_DESC* pDesc, D3D10_SUBRESOURCE_DATA* pInitialData, ID3D10Buffer* ppBuffer); 1159 HRESULT CreateTexture1D(D3D10_TEXTURE1D_DESC* pDesc, D3D10_SUBRESOURCE_DATA* pInitialData, ID3D10Texture1D* ppTexture1D); 1160 HRESULT CreateTexture2D(D3D10_TEXTURE2D_DESC* pDesc, D3D10_SUBRESOURCE_DATA* pInitialData, ID3D10Texture2D* ppTexture2D); 1161 HRESULT CreateTexture3D(D3D10_TEXTURE3D_DESC* pDesc, D3D10_SUBRESOURCE_DATA* pInitialData, ID3D10Texture3D* ppTexture3D); 1162 HRESULT CreateShaderResourceView(ID3D10Resource pResource, D3D10_SHADER_RESOURCE_VIEW_DESC* pDesc, ID3D10ShaderResourceView* ppSRView); 1163 HRESULT CreateRenderTargetView(ID3D10Resource pResource, D3D10_RENDER_TARGET_VIEW_DESC* pDesc, ID3D10RenderTargetView* ppRTView); 1164 HRESULT CreateDepthStencilView(ID3D10Resource pResource, D3D10_DEPTH_STENCIL_VIEW_DESC* pDesc, ID3D10DepthStencilView* ppDepthStencilView); 1165 HRESULT CreateInputLayout(D3D10_INPUT_ELEMENT_DESC* pInputElementDescs, UINT NumElements, void* pShaderBytecodeWithInputSignature, SIZE_T BytecodeLength, ID3D10InputLayout* ppInputLayout); 1166 HRESULT CreateVertexShader(void* pShaderBytecode, SIZE_T BytecodeLength, ID3D10VertexShader* ppVertexShader); 1167 HRESULT CreateGeometryShader(void* pShaderBytecode, SIZE_T BytecodeLength, ID3D10GeometryShader* ppGeometryShader); 1168 HRESULT CreateGeometryShaderWithStreamOutput(void* pShaderBytecode, SIZE_T BytecodeLength, D3D10_SO_DECLARATION_ENTRY* pSODeclaration, UINT NumEntries, UINT OutputStreamStride, ID3D10GeometryShader* ppGeometryShader); 1169 HRESULT CreatePixelShader(void* pShaderBytecode, SIZE_T BytecodeLength, ID3D10PixelShader* ppPixelShader); 1170 HRESULT CreateBlendState(D3D10_BLEND_DESC* pBlendStateDesc, ID3D10BlendState* ppBlendState); 1171 HRESULT CreateDepthStencilState(D3D10_DEPTH_STENCIL_DESC* pDepthStencilDesc, ID3D10DepthStencilState* ppDepthStencilState); 1172 HRESULT CreateRasterizerState(D3D10_RASTERIZER_DESC* pRasterizerDesc, ID3D10RasterizerState* ppRasterizerState); 1173 HRESULT CreateSamplerState(D3D10_SAMPLER_DESC* pSamplerDesc, ID3D10SamplerState* ppSamplerState); 1174 HRESULT CreateQuery(D3D10_QUERY_DESC* pQueryDesc, ID3D10Query* ppQuery); 1175 HRESULT CreatePredicate(D3D10_QUERY_DESC* pPredicateDesc, ID3D10Predicate* ppPredicate); 1176 HRESULT CreateCounter(D3D10_COUNTER_DESC* pCounterDesc, ID3D10Counter* ppCounter); 1177 HRESULT CheckFormatSupport(DXGI_FORMAT Format, UINT* pFormatSupport); 1178 HRESULT CheckMultisampleQualityLevels(DXGI_FORMAT Format, UINT SampleCount, UINT* pNumQualityLevels); 1179 void CheckCounterInfo(D3D10_COUNTER_INFO* pCounterInfo); 1180 HRESULT CheckCounter(D3D10_COUNTER_DESC* pDesc, D3D10_COUNTER_TYPE* pType, UINT* pActiveCounters, LPSTR szName, UINT* pNameLength, LPSTR szUnits, UINT* pUnitsLength, LPSTR szDescription, UINT* pDescriptionLength); 1181 UINT GetCreationFlags(); 1182 HRESULT OpenSharedResource(HANDLE hResource, REFIID ReturnedInterface, void** ppResource); 1183 void SetTextFilterSize(UINT Width, UINT Height); 1184 void GetTextFilterSize(UINT* pWidth, UINT* pHeight); 1185 } 1186 1187 interface ID3D10Multithread : IUnknown { 1188 extern(Windows) : 1189 void Enter(); 1190 void Leave(); 1191 BOOL SetMultithreadProtected(BOOL bMTProtect); 1192 BOOL GetMultithreadProtected(); 1193 } 1194 1195 enum D3D10_CREATE_DEVICE_FLAG { 1196 D3D10_CREATE_DEVICE_SINGLETHREADED = 0x01, 1197 D3D10_CREATE_DEVICE_DEBUG = 0x02, 1198 D3D10_CREATE_DEVICE_SWITCH_TO_REF = 0x04, 1199 D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x08 1200 } 1201 1202 const D3D10_SDK_VERSION = 29; 1203 1204 extern(C) const GUID IID_ID3D10DeviceChild = {0x9B7E4C00, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1205 extern(C) const GUID IID_ID3D10DepthStencilState = {0x2B4B1CC8, 0xA4AD, 0x41f8, [0x83, 0x22, 0xCA, 0x86, 0xFC, 0x3E, 0xC6, 0x75]}; 1206 extern(C) const GUID IID_ID3D10BlendState = {0xEDAD8D19, 0x8A35, 0x4d6d, [0x85, 0x66, 0x2E, 0xA2, 0x76, 0xCD, 0xE1, 0x61]}; 1207 extern(C) const GUID IID_ID3D10RasterizerState = {0xA2A07292, 0x89AF, 0x4345, [0xBE, 0x2E, 0xC5, 0x3D, 0x9F, 0xBB, 0x6E, 0x9F]}; 1208 extern(C) const GUID IID_ID3D10Resource = {0x9B7E4C01, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1209 extern(C) const GUID IID_ID3D10Buffer = {0x9B7E4C02, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1210 extern(C) const GUID IID_ID3D10Texture1D = {0x9B7E4C03, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1211 extern(C) const GUID IID_ID3D10Texture2D = {0x9B7E4C04, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1212 extern(C) const GUID IID_ID3D10Texture3D = {0x9B7E4C05, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1213 extern(C) const GUID IID_ID3D10View = {0xC902B03F, 0x60A7, 0x49BA, [0x99, 0x36, 0x2A, 0x3A, 0xB3, 0x7A, 0x7E, 0x33]}; 1214 extern(C) const GUID IID_ID3D10ShaderResourceView = {0x9B7E4C07, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1215 extern(C) const GUID IID_ID3D10RenderTargetView = {0x9B7E4C08, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1216 extern(C) const GUID IID_ID3D10DepthStencilView = {0x9B7E4C09, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1217 extern(C) const GUID IID_ID3D10VertexShader = {0x9B7E4C0A, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1218 extern(C) const GUID IID_ID3D10GeometryShader = {0x6316BE88, 0x54CD, 0x4040, [0xAB, 0x44, 0x20, 0x46, 0x1B, 0xC8, 0x1F, 0x68]}; 1219 extern(C) const GUID IID_ID3D10PixelShader = {0x4968B601, 0x9D00, 0x4cde, [0x83, 0x46, 0x8E, 0x7F, 0x67, 0x58, 0x19, 0xB6]}; 1220 extern(C) const GUID IID_ID3D10InputLayout = {0x9B7E4C0B, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1221 extern(C) const GUID IID_ID3D10SamplerState = {0x9B7E4C0C, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1222 extern(C) const GUID IID_ID3D10Asynchronous = {0x9B7E4C0D, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1223 extern(C) const GUID IID_ID3D10Query = {0x9B7E4C0E, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1224 extern(C) const GUID IID_ID3D10Predicate = {0x9B7E4C10, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1225 extern(C) const GUID IID_ID3D10Counter = {0x9B7E4C11, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1226 extern(C) const GUID IID_ID3D10Device = {0x9B7E4C0F, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1227 extern(C) const GUID IID_ID3D10Multithread = {0x9B7E4E00, 0x342C, 0x4106, [0xA1, 0x9F, 0x4F, 0x27, 0x04, 0xF6, 0x89, 0xF0]}; 1228 1229 public import win32.directx.d3d10shader; 1230 public import win32.directx.d3d10effect;