Artifact 46de09d905522b50fbb5ae5b73514dca44492f22:
- File
src/win32/directx/d3dx10mesh.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /*************** 0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..* 0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0060: 20 20 20 20 20 20 20 20 20 20 64 33 64 78 31 30 d3dx10 0070: 6d 65 73 68 2e 64 20 20 20 20 20 20 20 20 20 20 mesh.d 0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..* 00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *. 00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .* 00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows 0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu 0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le 0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..* 0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..* 0180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 P 0190: 6c 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c 69 laced into publi 01a0: 63 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 20 c domain 01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a * 01c0: 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ..\************* 01d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 01e0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 01f0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0200: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0d 0a 6d 6f 64 **********/..mod 0210: 75 6c 65 20 77 69 6e 33 32 2e 64 69 72 65 63 74 ule win32.direct 0220: 78 2e 64 33 64 78 31 30 6d 65 73 68 3b 0d 0a 0d x.d3dx10mesh;... 0230: 0a 70 72 69 76 61 74 65 20 69 6d 70 6f 72 74 20 .private import 0240: 77 69 6e 33 32 2e 77 69 6e 64 6f 77 73 3b 0d 0a win32.windows;.. 0250: 70 72 69 76 61 74 65 20 69 6d 70 6f 72 74 20 77 private import w 0260: 69 6e 33 32 2e 64 69 72 65 63 74 78 2e 64 33 64 in32.directx.d3d 0270: 31 30 3b 0d 0a 70 72 69 76 61 74 65 20 69 6d 70 10;..private imp 0280: 6f 72 74 20 77 69 6e 33 32 2e 64 69 72 65 63 74 ort win32.direct 0290: 78 2e 64 33 64 78 31 30 3b 0d 0a 0d 0a 65 78 74 x.d3dx10;....ext 02a0: 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 47 55 49 ern(C) const GUI 02b0: 44 20 49 49 44 5f 49 44 33 44 58 31 30 42 61 73 D IID_ID3DX10Bas 02c0: 65 4d 65 73 68 20 3d 20 7b 30 78 37 65 64 39 34 eMesh = {0x7ed94 02d0: 33 64 64 2c 20 30 78 35 32 65 38 2c 20 30 78 34 3dd, 0x52e8, 0x4 02e0: 30 62 35 2c 20 5b 30 78 61 38 2c 20 30 78 64 38 0b5, [0xa8, 0xd8 02f0: 2c 20 30 78 37 36 2c 20 30 78 36 38 2c 20 30 78 , 0x76, 0x68, 0x 0300: 35 63 2c 20 30 78 34 30 2c 20 30 78 36 33 2c 20 5c, 0x40, 0x63, 0310: 30 78 33 30 5d 7d 3b 0d 0a 65 78 74 65 72 6e 28 0x30]};..extern( 0320: 43 29 20 63 6f 6e 73 74 20 47 55 49 44 20 49 49 C) const GUID II 0330: 44 5f 49 44 33 44 58 31 30 4d 65 73 68 42 75 66 D_ID3DX10MeshBuf 0340: 66 65 72 20 3d 20 7b 30 78 34 62 30 64 31 31 37 fer = {0x4b0d117 0350: 2c 20 30 78 31 30 34 31 2c 20 30 78 34 36 62 31 , 0x1041, 0x46b1 0360: 2c 20 5b 30 78 61 61 2c 20 30 78 38 61 2c 20 30 , [0xaa, 0x8a, 0 0370: 78 33 39 2c 20 30 78 35 32 2c 20 30 78 38 34 2c x39, 0x52, 0x84, 0380: 20 30 78 38 62 2c 20 30 78 61 32 2c 20 30 78 32 0x8b, 0xa2, 0x2 0390: 65 5d 7d 3b 0d 0a 65 78 74 65 72 6e 28 43 29 20 e]};..extern(C) 03a0: 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44 5f 49 const GUID IID_I 03b0: 44 33 44 58 31 30 4d 65 73 68 20 3d 20 7b 30 78 D3DX10Mesh = {0x 03c0: 34 30 32 30 65 35 63 32 2c 20 30 78 31 34 30 33 4020e5c2, 0x1403 03d0: 2c 20 30 78 34 39 32 39 2c 20 5b 30 78 38 38 2c , 0x4929, [0x88, 03e0: 20 30 78 33 66 2c 20 30 78 65 32 2c 20 30 78 65 0x3f, 0xe2, 0xe 03f0: 38 2c 20 30 78 34 39 2c 20 30 78 66 61 2c 20 30 8, 0x49, 0xfa, 0 0400: 78 63 31 2c 20 30 78 39 35 5d 7d 3b 0d 0a 65 78 xc1, 0x95]};..ex 0410: 74 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 47 55 tern(C) const GU 0420: 49 44 20 49 49 44 5f 49 44 33 44 58 31 30 50 4d ID IID_ID3DX10PM 0430: 65 73 68 20 3d 20 7b 30 78 38 38 37 35 37 36 39 esh = {0x8875769 0440: 61 2c 20 30 78 64 35 37 39 2c 20 30 78 34 30 38 a, 0xd579, 0x408 0450: 38 2c 20 5b 30 78 61 61 2c 20 30 78 65 62 2c 20 8, [0xaa, 0xeb, 0460: 30 78 35 33 2c 20 30 78 34 64 2c 20 30 78 31 61 0x53, 0x4d, 0x1a 0470: 2c 20 30 78 64 38 2c 20 30 78 34 65 2c 20 30 78 , 0xd8, 0x4e, 0x 0480: 39 36 5d 7d 3b 0d 0a 65 78 74 65 72 6e 28 43 29 96]};..extern(C) 0490: 20 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44 5f const GUID IID_ 04a0: 49 44 33 44 58 31 30 53 50 4d 65 73 68 20 3d 20 ID3DX10SPMesh = 04b0: 7b 30 78 36 36 37 65 61 34 63 37 2c 20 30 78 66 {0x667ea4c7, 0xf 04c0: 31 63 64 2c 20 30 78 34 33 38 36 2c 20 5b 30 78 1cd, 0x4386, [0x 04d0: 62 35 2c 20 30 78 32 33 2c 20 30 78 37 63 2c 20 b5, 0x23, 0x7c, 04e0: 30 78 32 2c 20 30 78 39 30 2c 20 30 78 62 38 2c 0x2, 0x90, 0xb8, 04f0: 20 30 78 33 63 2c 20 30 78 63 35 5d 7d 3b 0d 0a 0x3c, 0xc5]};.. 0500: 65 78 74 65 72 6e 28 43 29 20 63 6f 6e 73 74 20 extern(C) const 0510: 47 55 49 44 20 49 49 44 5f 49 44 33 44 58 31 30 GUID IID_ID3DX10 0520: 50 61 74 63 68 4d 65 73 68 20 3d 20 7b 30 78 33 PatchMesh = {0x3 0530: 63 65 36 63 63 32 32 2c 20 30 78 64 62 66 32 2c ce6cc22, 0xdbf2, 0540: 20 30 78 34 34 66 34 2c 20 5b 30 78 38 39 2c 20 0x44f4, [0x89, 0550: 30 78 34 64 2c 20 30 78 66 39 2c 20 30 78 63 33 0x4d, 0xf9, 0xc3 0560: 2c 20 30 78 34 61 2c 20 30 78 33 33 2c 20 30 78 , 0x4a, 0x33, 0x 0570: 37 31 2c 20 30 78 33 39 5d 7d 3b 0d 0a 0d 0a 65 71, 0x39]};....e 0580: 6e 75 6d 20 44 33 44 58 31 30 5f 4d 45 53 48 20 num D3DX10_MESH 0590: 7b 0d 0a 20 20 20 20 44 33 44 58 31 30 5f 4d 45 {.. D3DX10_ME 05a0: 53 48 5f 33 32 5f 42 49 54 09 09 09 3d 20 30 78 SH_32_BIT...= 0x 05b0: 30 30 31 2c 0d 0a 20 20 20 20 44 33 44 58 31 30 001,.. D3DX10 05c0: 5f 4d 45 53 48 5f 47 53 5f 41 44 4a 41 43 45 4e _MESH_GS_ADJACEN 05d0: 43 59 09 3d 20 30 78 30 30 34 0d 0a 7d 0d 0a 0d CY.= 0x004..}... 05e0: 0a 73 74 72 75 63 74 20 44 33 44 58 31 30 5f 41 .struct D3DX10_A 05f0: 54 54 52 49 42 55 54 45 5f 52 41 4e 47 45 20 7b TTRIBUTE_RANGE { 0600: 0d 0a 20 20 20 20 55 49 4e 54 09 41 74 74 72 69 .. UINT.Attri 0610: 62 49 64 3b 0d 0a 20 20 20 20 55 49 4e 54 09 46 bId;.. UINT.F 0620: 61 63 65 53 74 61 72 74 3b 0d 0a 20 20 20 20 55 aceStart;.. U 0630: 49 4e 54 09 46 61 63 65 43 6f 75 6e 74 3b 0d 0a INT.FaceCount;.. 0640: 20 20 20 20 55 49 4e 54 09 56 65 72 74 65 78 53 UINT.VertexS 0650: 74 61 72 74 3b 0d 0a 20 20 20 20 55 49 4e 54 09 tart;.. UINT. 0660: 56 65 72 74 65 78 43 6f 75 6e 74 3b 0d 0a 7d 0d VertexCount;..}. 0670: 0a 0d 0a 65 6e 75 6d 20 44 33 44 58 31 30 5f 4d ...enum D3DX10_M 0680: 45 53 48 5f 44 49 53 43 41 52 44 5f 46 4c 41 47 ESH_DISCARD_FLAG 0690: 53 20 7b 0d 0a 20 20 20 20 44 33 44 58 31 30 5f S {.. D3DX10_ 06a0: 4d 45 53 48 5f 44 49 53 43 41 52 44 5f 41 54 54 MESH_DISCARD_ATT 06b0: 52 49 42 55 54 45 5f 42 55 46 46 45 52 20 3d 20 RIBUTE_BUFFER = 06c0: 30 78 30 31 2c 0d 0a 20 20 20 20 44 33 44 58 31 0x01,.. D3DX1 06d0: 30 5f 4d 45 53 48 5f 44 49 53 43 41 52 44 5f 41 0_MESH_DISCARD_A 06e0: 54 54 52 49 42 55 54 45 5f 54 41 42 4c 45 20 3d TTRIBUTE_TABLE = 06f0: 20 30 78 30 32 2c 0d 0a 20 20 20 20 44 33 44 58 0x02,.. D3DX 0700: 31 30 5f 4d 45 53 48 5f 44 49 53 43 41 52 44 5f 10_MESH_DISCARD_ 0710: 50 4f 49 4e 54 52 45 50 53 20 3d 20 30 78 30 34 POINTREPS = 0x04 0720: 2c 0d 0a 20 20 20 20 44 33 44 58 31 30 5f 4d 45 ,.. D3DX10_ME 0730: 53 48 5f 44 49 53 43 41 52 44 5f 41 44 4a 41 43 SH_DISCARD_ADJAC 0740: 45 4e 43 59 20 3d 20 30 78 30 38 2c 0d 0a 20 20 ENCY = 0x08,.. 0750: 20 20 44 33 44 58 31 30 5f 4d 45 53 48 5f 44 49 D3DX10_MESH_DI 0760: 53 43 41 52 44 5f 44 45 56 49 43 45 5f 42 55 46 SCARD_DEVICE_BUF 0770: 46 45 52 53 20 3d 20 30 78 31 30 0d 0a 7d 0d 0a FERS = 0x10..}.. 0780: 0d 0a 73 74 72 75 63 74 20 44 33 44 58 31 30 5f ..struct D3DX10_ 0790: 57 45 4c 44 5f 45 50 53 49 4c 4f 4e 53 20 7b 0d WELD_EPSILONS {. 07a0: 0a 20 20 20 20 46 4c 4f 41 54 20 50 6f 73 69 74 . FLOAT Posit 07b0: 69 6f 6e 3b 0d 0a 20 20 20 20 46 4c 4f 41 54 20 ion;.. FLOAT 07c0: 42 6c 65 6e 64 57 65 69 67 68 74 73 3b 0d 0a 20 BlendWeights;.. 07d0: 20 20 20 46 4c 4f 41 54 20 4e 6f 72 6d 61 6c 3b FLOAT Normal; 07e0: 0d 0a 20 20 20 20 46 4c 4f 41 54 20 50 53 69 7a .. FLOAT PSiz 07f0: 65 3b 0d 0a 20 20 20 20 46 4c 4f 41 54 20 53 70 e;.. FLOAT Sp 0800: 65 63 75 6c 61 72 3b 0d 0a 20 20 20 20 46 4c 4f ecular;.. FLO 0810: 41 54 20 44 69 66 66 75 73 65 3b 0d 0a 20 20 20 AT Diffuse;.. 0820: 20 46 4c 4f 41 54 5b 38 5d 20 54 65 78 63 6f 6f FLOAT[8] Texcoo 0830: 72 64 3b 0d 0a 20 20 20 20 46 4c 4f 41 54 20 54 rd;.. FLOAT T 0840: 61 6e 67 65 6e 74 3b 0d 0a 20 20 20 20 46 4c 4f angent;.. FLO 0850: 41 54 20 42 69 6e 6f 72 6d 61 6c 3b 0d 0a 20 20 AT Binormal;.. 0860: 20 20 46 4c 4f 41 54 20 54 65 73 73 46 61 63 74 FLOAT TessFact 0870: 6f 72 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 or;..}....struct 0880: 20 44 33 44 58 31 30 5f 49 4e 54 45 52 53 45 43 D3DX10_INTERSEC 0890: 54 5f 49 4e 46 4f 20 7b 0d 0a 20 20 20 20 55 49 T_INFO {.. UI 08a0: 4e 54 09 46 61 63 65 49 6e 64 65 78 3b 0d 0a 20 NT.FaceIndex;.. 08b0: 20 20 20 46 4c 4f 41 54 09 55 3b 0d 0a 20 20 20 FLOAT.U;.. 08c0: 20 46 4c 4f 41 54 09 56 3b 0d 0a 20 20 20 20 46 FLOAT.V;.. F 08d0: 4c 4f 41 54 09 44 69 73 74 3b 0d 0a 7d 0d 0a 0d LOAT.Dist;..}... 08e0: 0a 69 6e 74 65 72 66 61 63 65 20 49 44 33 44 58 .interface ID3DX 08f0: 31 30 4d 65 73 68 42 75 66 66 65 72 20 3a 20 49 10MeshBuffer : I 0900: 55 6e 6b 6e 6f 77 6e 20 7b 0d 0a 09 65 78 74 65 Unknown {...exte 0910: 72 6e 28 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 20 rn(Windows) :.. 0920: 20 20 20 48 52 45 53 55 4c 54 20 4d 61 70 28 76 HRESULT Map(v 0930: 6f 69 64 2a 2a 20 70 70 44 61 74 61 2c 20 53 49 oid** ppData, SI 0940: 5a 45 5f 54 2a 20 70 53 69 7a 65 29 3b 0d 0a 20 ZE_T* pSize);.. 0950: 20 20 20 48 52 45 53 55 4c 54 20 55 6e 6d 61 70 HRESULT Unmap 0960: 28 29 3b 0d 0a 20 20 20 20 53 49 5a 45 5f 54 20 ();.. SIZE_T 0970: 47 65 74 53 69 7a 65 28 29 3b 0d 0a 7d 0d 0a 0d GetSize();..}... 0980: 0a 69 6e 74 65 72 66 61 63 65 20 49 44 33 44 58 .interface ID3DX 0990: 31 30 4d 65 73 68 20 3a 20 49 55 6e 6b 6e 6f 77 10Mesh : IUnknow 09a0: 6e 20 7b 0d 0a 09 65 78 74 65 72 6e 28 57 69 6e n {...extern(Win 09b0: 64 6f 77 73 29 20 3a 0d 0a 20 20 20 20 55 49 4e dows) :.. UIN 09c0: 54 20 47 65 74 46 61 63 65 43 6f 75 6e 74 28 29 T GetFaceCount() 09d0: 3b 0d 0a 20 20 20 20 55 49 4e 54 20 47 65 74 56 ;.. UINT GetV 09e0: 65 72 74 65 78 43 6f 75 6e 74 28 29 3b 0d 0a 20 ertexCount();.. 09f0: 20 20 20 55 49 4e 54 20 47 65 74 56 65 72 74 65 UINT GetVerte 0a00: 78 42 75 66 66 65 72 43 6f 75 6e 74 28 29 3b 0d xBufferCount();. 0a10: 0a 20 20 20 20 55 49 4e 54 20 47 65 74 46 6c 61 . UINT GetFla 0a20: 67 73 28 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 gs();.. HRESU 0a30: 4c 54 20 47 65 74 56 65 72 74 65 78 44 65 73 63 LT GetVertexDesc 0a40: 72 69 70 74 69 6f 6e 28 44 33 44 31 30 5f 49 4e ription(D3D10_IN 0a50: 50 55 54 5f 45 4c 45 4d 45 4e 54 5f 44 45 53 43 PUT_ELEMENT_DESC 0a60: 2a 2a 20 70 70 44 65 73 63 2c 20 55 49 4e 54 2a ** ppDesc, UINT* 0a70: 20 70 44 65 63 6c 43 6f 75 6e 74 29 3b 0d 0a 20 pDeclCount);.. 0a80: 20 20 20 48 52 45 53 55 4c 54 20 53 65 74 56 65 HRESULT SetVe 0a90: 72 74 65 78 44 61 74 61 28 55 49 4e 54 20 69 42 rtexData(UINT iB 0aa0: 75 66 66 65 72 2c 20 76 6f 69 64 2a 20 70 44 61 uffer, void* pDa 0ab0: 74 61 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c ta);.. HRESUL 0ac0: 54 20 47 65 74 56 65 72 74 65 78 42 75 66 66 65 T GetVertexBuffe 0ad0: 72 28 55 49 4e 54 20 69 42 75 66 66 65 72 2c 20 r(UINT iBuffer, 0ae0: 49 44 33 44 58 31 30 4d 65 73 68 42 75 66 66 65 ID3DX10MeshBuffe 0af0: 72 2a 2a 20 70 70 56 65 72 74 65 78 42 75 66 66 r** ppVertexBuff 0b00: 65 72 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c er);.. HRESUL 0b10: 54 20 53 65 74 49 6e 64 65 78 44 61 74 61 28 76 T SetIndexData(v 0b20: 6f 69 64 2a 20 70 44 61 74 61 2c 20 55 49 4e 54 oid* pData, UINT 0b30: 20 63 49 6e 64 69 63 65 73 29 3b 0d 0a 20 20 20 cIndices);.. 0b40: 20 48 52 45 53 55 4c 54 20 47 65 74 49 6e 64 65 HRESULT GetInde 0b50: 78 42 75 66 66 65 72 28 49 44 33 44 58 31 30 4d xBuffer(ID3DX10M 0b60: 65 73 68 42 75 66 66 65 72 2a 2a 20 70 70 49 6e eshBuffer** ppIn 0b70: 64 65 78 42 75 66 66 65 72 29 3b 0d 0a 20 20 20 dexBuffer);.. 0b80: 20 48 52 45 53 55 4c 54 20 53 65 74 41 74 74 72 HRESULT SetAttr 0b90: 69 62 75 74 65 44 61 74 61 28 55 49 4e 54 2a 20 ibuteData(UINT* 0ba0: 70 44 61 74 61 29 3b 0d 0a 20 20 20 20 48 52 45 pData);.. HRE 0bb0: 53 55 4c 54 20 47 65 74 41 74 74 72 69 62 75 74 SULT GetAttribut 0bc0: 65 42 75 66 66 65 72 28 49 44 33 44 58 31 30 4d eBuffer(ID3DX10M 0bd0: 65 73 68 42 75 66 66 65 72 2a 2a 20 70 70 41 74 eshBuffer** ppAt 0be0: 74 72 69 62 75 74 65 42 75 66 66 65 72 29 3b 0d tributeBuffer);. 0bf0: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 53 65 74 . HRESULT Set 0c00: 41 74 74 72 69 62 75 74 65 54 61 62 6c 65 28 44 AttributeTable(D 0c10: 33 44 58 31 30 5f 41 54 54 52 49 42 55 54 45 5f 3DX10_ATTRIBUTE_ 0c20: 52 41 4e 47 45 2a 20 70 41 74 74 72 69 62 54 61 RANGE* pAttribTa 0c30: 62 6c 65 2c 20 55 49 4e 54 20 20 63 41 74 74 72 ble, UINT cAttr 0c40: 69 62 54 61 62 6c 65 53 69 7a 65 29 3b 0d 0a 20 ibTableSize);.. 0c50: 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 41 74 HRESULT GetAt 0c60: 74 72 69 62 75 74 65 54 61 62 6c 65 28 44 33 44 tributeTable(D3D 0c70: 58 31 30 5f 41 54 54 52 49 42 55 54 45 5f 52 41 X10_ATTRIBUTE_RA 0c80: 4e 47 45 2a 20 70 41 74 74 72 69 62 54 61 62 6c NGE* pAttribTabl 0c90: 65 2c 20 55 49 4e 54 2a 20 70 41 74 74 72 69 62 e, UINT* pAttrib 0ca0: 54 61 62 6c 65 53 69 7a 65 29 3b 0d 0a 20 20 20 TableSize);.. 0cb0: 20 48 52 45 53 55 4c 54 20 47 65 6e 65 72 61 74 HRESULT Generat 0cc0: 65 41 64 6a 61 63 65 6e 63 79 41 6e 64 50 6f 69 eAdjacencyAndPoi 0cd0: 6e 74 52 65 70 73 28 46 4c 4f 41 54 20 45 70 73 ntReps(FLOAT Eps 0ce0: 69 6c 6f 6e 29 3b 0d 0a 20 20 20 20 48 52 45 53 ilon);.. HRES 0cf0: 55 4c 54 20 47 65 6e 65 72 61 74 65 47 53 41 64 ULT GenerateGSAd 0d00: 6a 61 63 65 6e 63 79 28 29 3b 0d 0a 20 20 20 20 jacency();.. 0d10: 48 52 45 53 55 4c 54 20 53 65 74 41 64 6a 61 63 HRESULT SetAdjac 0d20: 65 6e 63 79 44 61 74 61 28 55 49 4e 54 2a 20 70 encyData(UINT* p 0d30: 41 64 6a 61 63 65 6e 63 79 29 3b 0d 0a 20 20 20 Adjacency);.. 0d40: 20 48 52 45 53 55 4c 54 20 47 65 74 41 64 6a 61 HRESULT GetAdja 0d50: 63 65 6e 63 79 42 75 66 66 65 72 28 49 44 33 44 cencyBuffer(ID3D 0d60: 58 31 30 4d 65 73 68 42 75 66 66 65 72 2a 2a 20 X10MeshBuffer** 0d70: 70 70 41 64 6a 61 63 65 6e 63 79 29 3b 0d 0a 20 ppAdjacency);.. 0d80: 20 20 20 48 52 45 53 55 4c 54 20 53 65 74 50 6f HRESULT SetPo 0d90: 69 6e 74 52 65 70 44 61 74 61 28 55 49 4e 54 2a intRepData(UINT* 0da0: 20 70 50 6f 69 6e 74 52 65 70 73 29 3b 0d 0a 20 pPointReps);.. 0db0: 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 50 6f HRESULT GetPo 0dc0: 69 6e 74 52 65 70 42 75 66 66 65 72 28 49 44 33 intRepBuffer(ID3 0dd0: 44 58 31 30 4d 65 73 68 42 75 66 66 65 72 2a 2a DX10MeshBuffer** 0de0: 20 70 70 50 6f 69 6e 74 52 65 70 73 29 3b 0d 0a ppPointReps);.. 0df0: 20 20 20 20 48 52 45 53 55 4c 54 20 44 69 73 63 HRESULT Disc 0e00: 61 72 64 28 44 33 44 58 31 30 5f 4d 45 53 48 5f ard(D3DX10_MESH_ 0e10: 44 49 53 43 41 52 44 5f 46 4c 41 47 53 20 64 77 DISCARD_FLAGS dw 0e20: 44 69 73 63 61 72 64 29 3b 0d 0a 20 20 20 20 48 Discard);.. H 0e30: 52 45 53 55 4c 54 20 43 6c 6f 6e 65 4d 65 73 68 RESULT CloneMesh 0e40: 28 55 49 4e 54 20 46 6c 61 67 73 2c 20 4c 50 43 (UINT Flags, LPC 0e50: 53 54 52 20 70 50 6f 73 53 65 6d 61 6e 74 69 63 STR pPosSemantic 0e60: 2c 20 44 33 44 31 30 5f 49 4e 50 55 54 5f 45 4c , D3D10_INPUT_EL 0e70: 45 4d 45 4e 54 5f 44 45 53 43 2a 20 70 44 65 73 EMENT_DESC* pDes 0e80: 63 2c 20 55 49 4e 54 20 20 44 65 63 6c 43 6f 75 c, UINT DeclCou 0e90: 6e 74 2c 20 49 44 33 44 58 31 30 4d 65 73 68 2a nt, ID3DX10Mesh* 0ea0: 2a 20 70 70 43 6c 6f 6e 65 4d 65 73 68 29 3b 0d * ppCloneMesh);. 0eb0: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 4f 70 74 . HRESULT Opt 0ec0: 69 6d 69 7a 65 28 55 49 4e 54 20 46 6c 61 67 73 imize(UINT Flags 0ed0: 2c 20 55 49 4e 54 20 2a 20 70 46 61 63 65 52 65 , UINT * pFaceRe 0ee0: 6d 61 70 2c 20 49 44 33 44 31 30 42 6c 6f 62 2a map, ID3D10Blob* 0ef0: 20 70 70 56 65 72 74 65 78 52 65 6d 61 70 29 3b ppVertexRemap); 0f00: 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 47 65 .. HRESULT Ge 0f10: 6e 65 72 61 74 65 41 74 74 72 69 62 75 74 65 42 nerateAttributeB 0f20: 75 66 66 65 72 46 72 6f 6d 54 61 62 6c 65 28 29 ufferFromTable() 0f30: 3b 0d 0a 09 48 52 45 53 55 4c 54 20 49 6e 74 65 ;...HRESULT Inte 0f40: 72 73 65 63 74 28 44 33 44 58 56 45 43 54 4f 52 rsect(D3DXVECTOR 0f50: 33 2a 20 70 52 61 79 50 6f 73 2c 20 44 33 44 58 3* pRayPos, D3DX 0f60: 56 45 43 54 4f 52 33 2a 20 70 52 61 79 44 69 72 VECTOR3* pRayDir 0f70: 2c 20 55 49 4e 54 2a 20 70 48 69 74 43 6f 75 6e , UINT* pHitCoun 0f80: 74 2c 20 55 49 4e 54 2a 20 70 46 61 63 65 49 6e t, UINT* pFaceIn 0f90: 64 65 78 2c 20 66 6c 6f 61 74 2a 20 70 55 2c 20 dex, float* pU, 0fa0: 66 6c 6f 61 74 2a 20 70 56 2c 20 66 6c 6f 61 74 float* pV, float 0fb0: 2a 20 70 44 69 73 74 2c 20 49 44 33 44 31 30 42 * pDist, ID3D10B 0fc0: 6c 6f 62 2a 20 70 70 41 6c 6c 48 69 74 73 29 3b lob* ppAllHits); 0fd0: 0d 0a 09 48 52 45 53 55 4c 54 20 49 6e 74 65 72 ...HRESULT Inter 0fe0: 73 65 63 74 53 75 62 73 65 74 28 55 49 4e 54 20 sectSubset(UINT 0ff0: 41 74 74 72 69 62 49 64 2c 20 44 33 44 58 56 45 AttribId, D3DXVE 1000: 43 54 4f 52 33 2a 20 70 52 61 79 50 6f 73 2c 20 CTOR3* pRayPos, 1010: 44 33 44 58 56 45 43 54 4f 52 33 2a 20 70 52 61 D3DXVECTOR3* pRa 1020: 79 44 69 72 2c 20 55 49 4e 54 2a 20 70 48 69 74 yDir, UINT* pHit 1030: 43 6f 75 6e 74 2c 20 55 49 4e 54 2a 20 70 46 61 Count, UINT* pFa 1040: 63 65 49 6e 64 65 78 2c 20 66 6c 6f 61 74 2a 20 ceIndex, float* 1050: 70 55 2c 20 66 6c 6f 61 74 2a 20 70 56 2c 20 66 pU, float* pV, f 1060: 6c 6f 61 74 2a 20 70 44 69 73 74 2c 20 49 44 33 loat* pDist, ID3 1070: 44 31 30 42 6c 6f 62 2a 20 70 70 41 6c 6c 48 69 D10Blob* ppAllHi 1080: 74 73 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c ts);.. HRESUL 1090: 54 20 43 6f 6d 6d 69 74 54 6f 44 65 76 69 63 65 T CommitToDevice 10a0: 28 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 ();.. HRESULT 10b0: 20 44 72 61 77 53 75 62 73 65 74 28 55 49 4e 54 DrawSubset(UINT 10c0: 20 41 74 74 72 69 62 49 64 29 3b 0d 0a 20 20 20 AttribId);.. 10d0: 20 48 52 45 53 55 4c 54 20 44 72 61 77 53 75 62 HRESULT DrawSub 10e0: 73 65 74 49 6e 73 74 61 6e 63 65 64 28 55 49 4e setInstanced(UIN 10f0: 54 20 41 74 74 72 69 62 49 64 2c 20 55 49 4e 54 T AttribId, UINT 1100: 20 49 6e 73 74 61 6e 63 65 43 6f 75 6e 74 2c 20 InstanceCount, 1110: 55 49 4e 54 20 53 74 61 72 74 49 6e 73 74 61 6e UINT StartInstan 1120: 63 65 4c 6f 63 61 74 69 6f 6e 29 3b 0d 0a 20 20 ceLocation);.. 1130: 20 20 48 52 45 53 55 4c 54 20 47 65 74 44 65 76 HRESULT GetDev 1140: 69 63 65 56 65 72 74 65 78 42 75 66 66 65 72 28 iceVertexBuffer( 1150: 55 49 4e 54 20 69 42 75 66 66 65 72 2c 20 49 44 UINT iBuffer, ID 1160: 33 44 31 30 42 75 66 66 65 72 2a 2a 20 70 70 56 3D10Buffer** ppV 1170: 65 72 74 65 78 42 75 66 66 65 72 29 3b 0d 0a 20 ertexBuffer);.. 1180: 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 44 65 HRESULT GetDe 1190: 76 69 63 65 49 6e 64 65 78 42 75 66 66 65 72 28 viceIndexBuffer( 11a0: 49 44 33 44 31 30 42 75 66 66 65 72 2a 2a 20 70 ID3D10Buffer** p 11b0: 70 49 6e 64 65 78 42 75 66 66 65 72 29 3b 0d 0a pIndexBuffer);.. 11c0: 7d 0d 0a 0d 0a 48 52 45 53 55 4c 54 20 44 33 44 }....HRESULT D3D 11d0: 58 31 30 43 72 65 61 74 65 4d 65 73 68 28 49 44 X10CreateMesh(ID 11e0: 33 44 31 30 44 65 76 69 63 65 2a 20 70 44 65 76 3D10Device* pDev 11f0: 69 63 65 2c 20 44 33 44 31 30 5f 49 4e 50 55 54 ice, D3D10_INPUT 1200: 5f 45 4c 45 4d 45 4e 54 5f 44 45 53 43 2a 20 70 _ELEMENT_DESC* p 1210: 44 65 63 6c 61 72 61 74 69 6f 6e 2c 20 55 49 4e Declaration, UIN 1220: 54 20 20 44 65 63 6c 43 6f 75 6e 74 2c 20 4c 50 T DeclCount, LP 1230: 43 53 54 52 20 70 50 6f 73 69 74 69 6f 6e 53 65 CSTR pPositionSe 1240: 6d 61 6e 74 69 63 2c 20 55 49 4e 54 20 20 56 65 mantic, UINT Ve 1250: 72 74 65 78 43 6f 75 6e 74 2c 20 55 49 4e 54 20 rtexCount, UINT 1260: 20 46 61 63 65 43 6f 75 6e 74 2c 20 55 49 4e 54 FaceCount, UINT 1270: 20 20 4f 70 74 69 6f 6e 73 2c 20 49 44 33 44 58 Options, ID3DX 1280: 31 30 4d 65 73 68 2a 2a 20 70 70 4d 65 73 68 29 10Mesh** ppMesh) 1290: 3b 0d 0a 0d 0a 65 6e 75 6d 20 44 33 44 58 31 30 ;....enum D3DX10 12a0: 5f 4d 45 53 48 4f 50 54 20 7b 0d 0a 20 20 20 20 _MESHOPT {.. 12b0: 44 33 44 58 31 30 5f 4d 45 53 48 4f 50 54 5f 43 D3DX10_MESHOPT_C 12c0: 4f 4d 50 41 43 54 09 09 09 09 3d 20 30 78 30 31 OMPACT....= 0x01 12d0: 30 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 33 44 000000,.. D3D 12e0: 58 31 30 5f 4d 45 53 48 4f 50 54 5f 41 54 54 52 X10_MESHOPT_ATTR 12f0: 5f 53 4f 52 54 09 09 09 3d 20 30 78 30 32 30 30 _SORT...= 0x0200 1300: 30 30 30 30 2c 0d 0a 20 20 20 20 44 33 44 58 31 0000,.. D3DX1 1310: 30 5f 4d 45 53 48 4f 50 54 5f 56 45 52 54 45 58 0_MESHOPT_VERTEX 1320: 5f 43 41 43 48 45 09 09 09 3d 20 30 78 30 34 30 _CACHE...= 0x040 1330: 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 33 44 58 00000,.. D3DX 1340: 31 30 5f 4d 45 53 48 4f 50 54 5f 53 54 52 49 50 10_MESHOPT_STRIP 1350: 5f 52 45 4f 52 44 45 52 09 09 3d 20 30 78 30 38 _REORDER..= 0x08 1360: 30 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 33 44 000000,.. D3D 1370: 58 31 30 5f 4d 45 53 48 4f 50 54 5f 49 47 4e 4f X10_MESHOPT_IGNO 1380: 52 45 5f 56 45 52 54 53 09 09 09 3d 20 30 78 31 RE_VERTS...= 0x1 1390: 30 30 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 33 0000000,.. D3 13a0: 44 58 31 30 5f 4d 45 53 48 4f 50 54 5f 44 4f 5f DX10_MESHOPT_DO_ 13b0: 4e 4f 54 5f 53 50 4c 49 54 09 09 09 3d 20 30 78 NOT_SPLIT...= 0x 13c0: 32 30 30 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 20000000,.. D 13d0: 33 44 58 31 30 5f 4d 45 53 48 4f 50 54 5f 44 45 3DX10_MESHOPT_DE 13e0: 56 49 43 45 5f 49 4e 44 45 50 45 4e 44 45 4e 54 VICE_INDEPENDENT 13f0: 09 3d 20 30 78 30 30 34 30 30 30 30 30 0d 0a 7d .= 0x00400000..} 1400: 0d 0a 0d 0a 65 78 74 65 72 6e 28 43 29 20 63 6f ....extern(C) co 1410: 6e 73 74 20 47 55 49 44 20 49 49 44 5f 49 44 33 nst GUID IID_ID3 1420: 44 58 31 30 53 6b 69 6e 49 6e 66 6f 20 3d 20 7b DX10SkinInfo = { 1430: 30 78 34 32 30 62 64 36 30 34 2c 20 30 78 31 63 0x420bd604, 0x1c 1440: 37 36 2c 20 30 78 34 61 33 34 2c 20 5b 30 78 61 76, 0x4a34, [0xa 1450: 34 2c 20 30 78 36 36 2c 20 30 78 65 34 2c 20 30 4, 0x66, 0xe4, 0 1460: 78 35 64 2c 20 30 78 36 2c 20 30 78 35 38 2c 20 x5d, 0x6, 0x58, 1470: 30 78 61 33 2c 20 30 78 32 63 5d 7d 3b 0d 0a 0d 0xa3, 0x2c]};... 1480: 0a 63 6f 6e 73 74 20 44 33 44 58 31 30 5f 53 4b .const D3DX10_SK 1490: 49 4e 49 4e 46 4f 5f 4e 4f 5f 53 43 41 4c 49 4e ININFO_NO_SCALIN 14a0: 47 20 3d 20 30 3b 0d 0a 63 6f 6e 73 74 20 44 33 G = 0;..const D3 14b0: 44 58 31 30 5f 53 4b 49 4e 49 4e 46 4f 5f 53 43 DX10_SKININFO_SC 14c0: 41 4c 45 5f 54 4f 5f 31 20 3d 20 31 3b 0d 0a 63 ALE_TO_1 = 1;..c 14d0: 6f 6e 73 74 20 44 33 44 58 31 30 5f 53 4b 49 4e onst D3DX10_SKIN 14e0: 49 4e 46 4f 5f 53 43 41 4c 45 5f 54 4f 5f 54 4f INFO_SCALE_TO_TO 14f0: 54 41 4c 20 3d 20 32 3b 0d 0a 0d 0a 73 74 72 75 TAL = 2;....stru 1500: 63 74 20 44 33 44 58 31 30 5f 53 4b 49 4e 4e 49 ct D3DX10_SKINNI 1510: 4e 47 5f 43 48 41 4e 4e 45 4c 20 7b 0d 0a 20 20 NG_CHANNEL {.. 1520: 20 20 55 49 4e 54 20 53 72 63 4f 66 66 73 65 74 UINT SrcOffset 1530: 3b 0d 0a 20 20 20 20 55 49 4e 54 20 44 65 73 74 ;.. UINT Dest 1540: 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 42 4f 4f Offset;.. BOO 1550: 4c 20 49 73 4e 6f 72 6d 61 6c 3b 0d 0a 7d 0d 0a L IsNormal;..}.. 1560: 0d 0a 69 6e 74 65 72 66 61 63 65 20 49 44 33 44 ..interface ID3D 1570: 58 31 30 53 6b 69 6e 49 6e 66 6f 20 3a 20 49 55 X10SkinInfo : IU 1580: 6e 6b 6e 6f 77 6e 20 7b 0d 0a 09 65 78 74 65 72 nknown {...exter 1590: 6e 28 57 69 6e 64 6f 77 73 29 20 3a 0d 0a 09 48 n(Windows) :...H 15a0: 52 45 53 55 4c 54 20 51 75 65 72 79 49 6e 74 65 RESULT QueryInte 15b0: 72 66 61 63 65 28 52 45 46 49 49 44 20 69 69 64 rface(REFIID iid 15c0: 2c 20 4c 50 56 4f 49 44 2a 20 70 70 76 29 3b 0d , LPVOID* ppv);. 15d0: 0a 09 55 4c 4f 4e 47 20 41 64 64 52 65 66 28 29 ..ULONG AddRef() 15e0: 3b 0d 0a 09 55 4c 4f 4e 47 20 52 65 6c 65 61 73 ;...ULONG Releas 15f0: 65 28 29 3b 0d 0a 09 55 49 4e 54 20 47 65 74 4e e();...UINT GetN 1600: 75 6d 56 65 72 74 69 63 65 73 28 29 3b 0d 0a 09 umVertices();... 1610: 55 49 4e 54 20 47 65 74 4e 75 6d 42 6f 6e 65 73 UINT GetNumBones 1620: 28 29 3b 0d 0a 09 55 49 4e 54 20 47 65 74 4d 61 ();...UINT GetMa 1630: 78 42 6f 6e 65 49 6e 66 6c 75 65 6e 63 65 73 28 xBoneInfluences( 1640: 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 41 64 64 );...HRESULT Add 1650: 56 65 72 74 69 63 65 73 28 55 49 4e 54 20 43 6f Vertices(UINT Co 1660: 75 6e 74 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 unt);...HRESULT 1670: 52 65 6d 61 70 56 65 72 74 69 63 65 73 28 55 49 RemapVertices(UI 1680: 4e 54 20 4e 65 77 56 65 72 74 65 78 43 6f 75 6e NT NewVertexCoun 1690: 74 2c 20 55 49 4e 54 2a 20 70 56 65 72 74 65 78 t, UINT* pVertex 16a0: 52 65 6d 61 70 29 3b 0d 0a 09 48 52 45 53 55 4c Remap);...HRESUL 16b0: 54 20 41 64 64 42 6f 6e 65 73 28 55 49 4e 54 20 T AddBones(UINT 16c0: 43 6f 75 6e 74 29 3b 0d 0a 09 48 52 45 53 55 4c Count);...HRESUL 16d0: 54 20 52 65 6d 6f 76 65 42 6f 6e 65 28 55 49 4e T RemoveBone(UIN 16e0: 54 20 49 6e 64 65 78 29 3b 0d 0a 09 48 52 45 53 T Index);...HRES 16f0: 55 4c 54 20 52 65 6d 61 70 42 6f 6e 65 73 28 55 ULT RemapBones(U 1700: 49 4e 54 20 4e 65 77 42 6f 6e 65 43 6f 75 6e 74 INT NewBoneCount 1710: 2c 20 55 49 4e 54 2a 20 70 42 6f 6e 65 52 65 6d , UINT* pBoneRem 1720: 61 70 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 41 ap);...HRESULT A 1730: 64 64 42 6f 6e 65 49 6e 66 6c 75 65 6e 63 65 73 ddBoneInfluences 1740: 28 55 49 4e 54 20 42 6f 6e 65 49 6e 64 65 78 2c (UINT BoneIndex, 1750: 20 55 49 4e 54 20 49 6e 66 6c 75 65 6e 63 65 43 UINT InfluenceC 1760: 6f 75 6e 74 2c 20 55 49 4e 54 2a 20 70 49 6e 64 ount, UINT* pInd 1770: 69 63 65 73 2c 20 66 6c 6f 61 74 2a 20 70 57 65 ices, float* pWe 1780: 69 67 68 74 73 29 3b 0d 0a 09 48 52 45 53 55 4c ights);...HRESUL 1790: 54 20 43 6c 65 61 72 42 6f 6e 65 49 6e 66 6c 75 T ClearBoneInflu 17a0: 65 6e 63 65 73 28 55 49 4e 54 20 42 6f 6e 65 49 ences(UINT BoneI 17b0: 6e 64 65 78 29 3b 0d 0a 09 55 49 4e 54 20 47 65 ndex);...UINT Ge 17c0: 74 42 6f 6e 65 49 6e 66 6c 75 65 6e 63 65 43 6f tBoneInfluenceCo 17d0: 75 6e 74 28 55 49 4e 54 20 42 6f 6e 65 49 6e 64 unt(UINT BoneInd 17e0: 65 78 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 47 ex);...HRESULT G 17f0: 65 74 42 6f 6e 65 49 6e 66 6c 75 65 6e 63 65 73 etBoneInfluences 1800: 28 55 49 4e 54 20 42 6f 6e 65 49 6e 64 65 78 2c (UINT BoneIndex, 1810: 20 55 49 4e 54 20 4f 66 66 73 65 74 2c 20 55 49 UINT Offset, UI 1820: 4e 54 20 43 6f 75 6e 74 2c 20 55 49 4e 54 2a 20 NT Count, UINT* 1830: 70 44 65 73 74 49 6e 64 69 63 65 73 2c 20 66 6c pDestIndices, fl 1840: 6f 61 74 2a 20 70 44 65 73 74 57 65 69 67 68 74 oat* pDestWeight 1850: 73 29 3b 0d 0a 09 48 52 45 53 55 4c 54 20 46 69 s);...HRESULT Fi 1860: 6e 64 42 6f 6e 65 49 6e 66 6c 75 65 6e 63 65 49 ndBoneInfluenceI 1870: 6e 64 65 78 28 55 49 4e 54 20 42 6f 6e 65 49 6e ndex(UINT BoneIn 1880: 64 65 78 2c 20 55 49 4e 54 20 56 65 72 74 65 78 dex, UINT Vertex 1890: 49 6e 64 65 78 2c 20 55 49 4e 54 2a 20 70 49 6e Index, UINT* pIn 18a0: 66 6c 75 65 6e 63 65 49 6e 64 65 78 29 3b 0d 0a fluenceIndex);.. 18b0: 09 48 52 45 53 55 4c 54 20 53 65 74 42 6f 6e 65 .HRESULT SetBone 18c0: 49 6e 66 6c 75 65 6e 63 65 28 55 49 4e 54 20 42 Influence(UINT B 18d0: 6f 6e 65 49 6e 64 65 78 2c 20 55 49 4e 54 20 49 oneIndex, UINT I 18e0: 6e 66 6c 75 65 6e 63 65 49 6e 64 65 78 2c 20 66 nfluenceIndex, f 18f0: 6c 6f 61 74 20 57 65 69 67 68 74 29 3b 0d 0a 09 loat Weight);... 1900: 48 52 45 53 55 4c 54 20 47 65 74 42 6f 6e 65 49 HRESULT GetBoneI 1910: 6e 66 6c 75 65 6e 63 65 28 55 49 4e 54 20 42 6f nfluence(UINT Bo 1920: 6e 65 49 6e 64 65 78 2c 20 55 49 4e 54 20 49 6e neIndex, UINT In 1930: 66 6c 75 65 6e 63 65 49 6e 64 65 78 2c 20 66 6c fluenceIndex, fl 1940: 6f 61 74 2a 20 70 57 65 69 67 68 74 29 3b 0d 0a oat* pWeight);.. 1950: 09 48 52 45 53 55 4c 54 20 43 6f 6d 70 61 63 74 .HRESULT Compact 1960: 28 55 49 4e 54 20 4d 61 78 50 65 72 56 65 72 74 (UINT MaxPerVert 1970: 65 78 49 6e 66 6c 75 65 6e 63 65 73 2c 20 55 49 exInfluences, UI 1980: 4e 54 20 53 63 61 6c 65 4d 6f 64 65 2c 20 66 6c NT ScaleMode, fl 1990: 6f 61 74 20 4d 69 6e 57 65 69 67 68 74 29 3b 0d oat MinWeight);. 19a0: 0a 09 48 52 45 53 55 4c 54 20 44 6f 53 6f 66 74 ..HRESULT DoSoft 19b0: 77 61 72 65 53 6b 69 6e 6e 69 6e 67 28 55 49 4e wareSkinning(UIN 19c0: 54 20 53 74 61 72 74 56 65 72 74 65 78 2c 20 55 T StartVertex, U 19d0: 49 4e 54 20 56 65 72 74 65 78 43 6f 75 6e 74 2c INT VertexCount, 19e0: 20 76 6f 69 64 2a 20 70 53 72 63 56 65 72 74 69 void* pSrcVerti 19f0: 63 65 73 2c 20 55 49 4e 54 20 53 72 63 53 74 72 ces, UINT SrcStr 1a00: 69 64 65 2c 20 76 6f 69 64 2a 20 70 44 65 73 74 ide, void* pDest 1a10: 56 65 72 74 69 63 65 73 2c 20 55 49 4e 54 20 44 Vertices, UINT D 1a20: 65 73 74 53 74 72 69 64 65 2c 20 44 33 44 58 4d estStride, D3DXM 1a30: 41 54 52 49 58 2a 20 70 42 6f 6e 65 4d 61 74 72 ATRIX* pBoneMatr 1a40: 69 63 65 73 2c 20 44 33 44 58 4d 41 54 52 49 58 ices, D3DXMATRIX 1a50: 2a 20 70 49 6e 76 65 72 73 65 54 72 61 6e 73 70 * pInverseTransp 1a60: 6f 73 65 42 6f 6e 65 4d 61 74 72 69 63 65 73 2c oseBoneMatrices, 1a70: 20 44 33 44 58 31 30 5f 53 4b 49 4e 4e 49 4e 47 D3DX10_SKINNING 1a80: 5f 43 48 41 4e 4e 45 4c 2a 20 70 43 68 61 6e 6e _CHANNEL* pChann 1a90: 65 6c 44 65 73 63 73 2c 20 55 49 4e 54 20 4e 75 elDescs, UINT Nu 1aa0: 6d 43 68 61 6e 6e 65 6c 73 29 3b 0d 0a 7d 0d 0a mChannels);..}.. 1ab0: 0d 0a 48 52 45 53 55 4c 54 20 44 33 44 58 31 30 ..HRESULT D3DX10 1ac0: 43 72 65 61 74 65 53 6b 69 6e 49 6e 66 6f 28 49 CreateSkinInfo(I 1ad0: 44 33 44 58 31 30 53 6b 69 6e 49 6e 66 6f 2a 20 D3DX10SkinInfo* 1ae0: 70 70 53 6b 69 6e 49 6e 66 6f 29 3b 0d 0a 0d 0a ppSkinInfo);.... 1af0: 73 74 72 75 63 74 20 44 33 44 58 31 30 5f 41 54 struct D3DX10_AT 1b00: 54 52 49 42 55 54 45 5f 57 45 49 47 48 54 53 20 TRIBUTE_WEIGHTS 1b10: 7b 0d 0a 09 46 4c 4f 41 54 20 50 6f 73 69 74 69 {...FLOAT Positi 1b20: 6f 6e 3b 0d 0a 09 46 4c 4f 41 54 20 42 6f 75 6e on;...FLOAT Boun 1b30: 64 61 72 79 3b 0d 0a 09 46 4c 4f 41 54 20 4e 6f dary;...FLOAT No 1b40: 72 6d 61 6c 3b 0d 0a 09 46 4c 4f 41 54 20 44 69 rmal;...FLOAT Di 1b50: 66 66 75 73 65 3b 0d 0a 09 46 4c 4f 41 54 20 53 ffuse;...FLOAT S 1b60: 70 65 63 75 6c 61 72 3b 0d 0a 09 46 4c 4f 41 54 pecular;...FLOAT 1b70: 5b 38 5d 20 54 65 78 63 6f 6f 72 64 3b 0d 0a 09 [8] Texcoord;... 1b80: 46 4c 4f 41 54 20 54 61 6e 67 65 6e 74 3b 0d 0a FLOAT Tangent;.. 1b90: 09 46 4c 4f 41 54 20 42 69 6e 6f 72 6d 61 6c 3b .FLOAT Binormal; 1ba0: 0d 0a 7d 0d 0a 0d 0a ..}....