03-10-2005, 11:38 AM
He he he... now this crashes. :roll:
Code:
Type Surface_Properties
RGBA(3) as Single
Spec(3) as Single
End Type
Type Vector3DType
X as Single
Y as Single
Z as Single
End Type
Type Model_Type
Num_Verts as Integer
Num_Faces as Integer
Num_Surfaces as Integer
Vec as Vector3DType Ptr
Surf as Surface_Properties ptr
end Type
Dim Model(1 to 10) as Model_Type ptr
Model(1)->Num_Verts = 100
Model(1)->Num_Surfaces = 3
Model(1)->Vec = Callocate(Model(1)->Num_Verts * Len(Vector3DType))
Model(1)->Surf = Callocate(Model(1)->Num_Surfaces * Len(Surface_Properties))