Allocates a block of memory with a fixed shape.
Parameters
| Data Type | Code |
| AGL_UCHAR | 4096 |
| AGL_CHAR | 4097 |
| AGL_USHORT | 4098 |
| AGL_SHORT | 4099 |
| AGL_ULONG | 4100 |
| AGL_LONG | 4101 |
| AGL_FLOAT | 4102 |
| AGL_DOUBLE | 4103 |
| AGL_ULLONG | 4104 |
| AGL_LLONG | 4105 |
Return Value
Returns a pointer to the allocated block of memory, or NULL if aglAlloc was unable to allocate the memory.
Remarks
Unlike aglMalloc, aglAlloc allocates a block of memory using arrays of pointers.
This means that you can refer to multi-dimensional array elements using bracket
notation rather than pointer arithmetic; for example: M[i][j] rather
than M[i*NumberOfCols + j]. You should eventually deallocate the
memory by calling aglFree.
Note: aglReshape cannot be used with this memory block to modify the array shape.
See Also