perm - creates a "permanent" copy of the given val
oadl::perm(
val)
By default, OADL dynamic values are located in its automatically- managed heap. As a consequence, the actual address of the object's contents will change at non-deterministic intervals. This can cause problems when interfacing with external libraries.
To avoid this problem, OADL has an additional, non-dynamic heap which stores items that are intended to be "permanent" - they will never be freed, even if there are no references to them.
To create a dynamic value in this heap, use the
oadl::perm()
intrinsic procedure.
A "permanent" copy of the value
None
a = [[0.,0.,0.], [0.,1.,0.], [1.,0.,0.]] // glVertexPointer needs a "permanent" array that won't move around // between calls a = oadl::perm(a) gl1::VertexPointer(3, gl1::GL_FLOAT, 0, a) gl1::DrawArrays(gl1::GL_TRIANGLES, 0, 1)