im trying to use Dx9 to create a Mesh but i can seem to get this peace of code to work. (



Code: Select all
LocalMesh.ID3DXMesh
Dim vertices.MYVERTEX(3)
vertices(0)\x = 0.0
vertices(0)\y = 10.0
vertices(0)\z = 50
vertices(0)\color = D3DCOLOR_ARGB(255,255,0,0)
vertices(1)\x = 10.0
vertices(1)\y = 0.0
vertices(1)\z = 50
vertices(1)\color = D3DCOLOR_ARGB(255,0,255,0)
vertices(2)\x = -10.0
vertices(2)\y = 0.0
vertices(2)\z = 50
vertices(2)\color = D3DCOLOR_ARGB(255,0,0,255)
D3DXCreateMeshFVF(1,3,#D3DXMESH_MANAGED ,#D3DFVF_XYZ | #D3DFVF_DIFFUSE,MMS_D3DDEVICE , @LocalMesh)
Protected *pVertices=0
LocalMesh\LockVertexBuffer(0 , @*pVertices)
CopyMemory(@vertices(),*pVertices, 3*16)
LocalMesh\UnlockVertexBuffer()