VB Code:
Call SetCordinates(G3DFile1)
Call generateNormals
Set VBuffer = D3DDevice.CreateVertexBuffer(Len(POINTS(0)) * NoOfPoints, 0, Unlit_FVF, D3DPOOL_DEFAULT)
If VBuffer Is Nothing Then Exit Sub
D3DVertexBuffer8SetData VBuffer, 0, Len(POINTS(0)) * NoOfPoints, 0, POINTS(0)
For I = 0 To 11
Set MeshTextures(I) = D3DX.CreateTextureFromFileEx(D3DDevice, App.Path & _
"\a" & Format$(I, "00") & ".bmp", 256, 256, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_FILTER_LINEAR, D3DX_FILTER_LINEAR, 0, ByVal 0, ByVal 0)
Next