For an extra 50 -
Further to our discussion on using CopyMemory to pass lists about:
I am getting an error with reading the memory. Is there a maximum size of memory that I can copy?
I am now passing more points (as I need ordered triangles for OpenGL)
Dim mysglcoord() As sglCoordinate3D
Dim mycoords As Single
Dim i As Long
ReDim mysglcoord(1 To MyTSB.numTriangleCoords)
mycoords = MyTSB.sglTriangleCoords
CopyMemory VarPtr(mysglcoord(1)), mycoords, 12 * (MyTSB.numTriangleCoords)
For i = 1 To MyTSB.numTriangleCoords
Call glColor3f(1#, 1#, 0#)
Call glVertex3f(mysglcoord(i).x, mysglcoord(i).y, mysglcoord(i).z)
I get the message:
The instruction at "0x77f970ab" referenced memory at "0x0ab7200". The memory could not be "read".
You know, the standard crashing error. The size of the operation is all I can think of.