Original Post
hey,
I''m having a really hard time getting the GenerateAdjacency function to work. I keep getting Automation error when calling the function. I figure my fault must be when I create the Buffer or perhaps when creating the mesh.
Here''s a snipet of the code (and btw it''s in VB):
----------------------------------------------------------------
Dim Adj As D3DXBuffer
Dim Float As Single
Set Adj = g_d3dx.CreateBuffer(12# * Mesh.GetNumFaces)
Mesh.GenerateAdjacency 0, ByVal Adj.GetBufferPointer
----------------------------------------------------------------
The value 12 comes from the Length of a single, which is four, times three. This is the size which DX SDK tells me to use:
quote:Thanx in advance regards, /omid
Make sure that the size of this array is at least 3 * GetNumFaces * Len(Single) bytes long.