Q3MemoryStorage_NewBuffer
You can use theQ3MemoryStorage_NewBufferfunction to create a new memory storage object. The data you provide is not copied into QuickDraw 3D memory.
TQ3StorageObject Q3MemoryStorage_NewBuffer ( unsigned char *buffer, unsigned long validSize, unsigned long bufferSize);
buffer- A pointer to a buffer in memory, or
NULL.validSize- The size, in bytes, of the valid metafile data contained in the specified buffer. If
bufferis set toNULL, this parameter specifies the initial size and also the grow size of the buffer that QuickDraw 3D allocates internally.bufferSize- The size, in bytes, of the specified buffer.
DESCRIPTION
TheQ3MemoryStorage_NewBufferfunction returns, as its function result, a new memory storage object associated with the buffer specified by thebufferandvalidSizeparameters. The data in the specified buffer is not copied into internal QuickDraw 3D memory, so your application must not access that buffer until the associated storage object is closed or disposed of.If you pass the value
NULLin thebufferparameter, QuickDraw 3D allocates a buffer ofvalidSizebytes, increases the buffer by that size whenever necessary, and later disposes of the buffer when the associated storage object is closed or disposed of. Ifbufferis set toNULLandvalidSizeis set to 0, QuickDraw 3D uses a default initial buffer and grow size.The
bufferSizeparameter specifies the size of the specified buffer. ThevalidSizeparameter specifies the size of the valid metafile data contained in the buffer. The value of thevalidSizeparameter should always be less than or equal to the value of thebufferSizeparameter. This allows you to maintain other data in the buffer following the valid metafile data.If
Q3MemoryStorage_NewBuffercannot create a new storage object, it returns the valueNULL.ERRORS
kQ3ErrorOutOfMemory