
03-30-2006, 04:33 AM
|
 |
Junior Contributor
|
|
Join Date: Jul 2005
Location: Wherever i fall over
Posts: 222
|
|
Mesh Subsets
 i had this problem too, the way to overcome it is to draw the mesh subsets seperatley, obviously you have to get the number of subsets before you can use this this is easily done when you load the mesh, the maxlimbs
 The best thing about drawing the subsets seperately is that you can apply different transforms, materials, textures, lighting, basically treating them as seperate meshes.
 The code is simplfied but basically works.
Code:
Dim Materials as D3DXBuffer, Adjaceny as D3DXBuffer, MaxLimbs as Long
Set Mesh = Dx8D3D.LoadMeshFromX(File, D3DXMESH_MANAGED, Dx8Device3D, Adjacency, Materials, MaxLimbs)
With Mesh
Dim C As Long
For C = 1 To MaxLimbs
'Add draw code here
.DrawSubset C
Next C
End With
|
__________________
Fact: The best ideas come when your smashed of your face. So drink beer and be merry!!!
|