public interface MDLMeshBuffer extends NSCopying
Used by ModelIO to represent a buffer to be filled with vertex and index data
Supports deep copy of data by conforming to the NSCopying protocol
| Modifier and Type | Method and Description |
|---|---|
MDLMeshBufferAllocator |
allocator()
[@property] allocator
|
void |
fillDataOffset(NSData data,
long offset)
fillData:offset:
|
long |
length()
[@property] length
|
MDLMeshBufferMap |
map()
map
|
long |
type()
[@property] type
|
MDLMeshBufferZone |
zone()
[@property] zone
|
copyWithZoneMDLMeshBufferAllocator allocator()
Allocator object used to create this buffer.
This allcoator used for copy and relayout operations (such as when a new vertex descriptor is applied to a vertex buffer)
void fillDataOffset(NSData data, long offset)
Fills buffer with data at offset
Fills data.length bytes of data. Will not write beyond length of this buffer.
data - Data to fill buffer withoffset - Byte offset in buffer to begin filling datalong length()
Size in bytes of the buffer allocation
MDLMeshBufferMap map()
CPU access to buffer's memory
The buffer will remain mapped as long as the returned MDLMeshBufferMap object exists. Mapping a buffer may impose restrictions on a system. For instance, if the implementing class maps an OpenGL buffer, that buffer may be unavailable for rendering while mapped, and cause a draw failure. Precautions must be taken in such cases.
long type()
the intended type of the buffer
MDLMeshBufferZone zone()
Zone from which this buffer was created
This zone will be used for copy and relayout operations (such as when a new vertex descriptor is applied to a vertex buffer). If the default zone is used this will be nil.