Package apple.modelio.protocol
Interface MDLMeshBuffer
-
- All Superinterfaces:
NSCopying
- All Known Implementing Classes:
GLKMeshBuffer,MDLMeshBufferData,MTKMeshBuffer
public interface MDLMeshBuffer extends NSCopying
[@protocol] MDLMeshBuffer 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MDLMeshBufferAllocatorallocator()[@property] allocator Allocator object used to create this buffer.voidfillDataOffset(NSData data, long offset)fillData:offset: Fills buffer with data at offset Fills data.length bytes of data.longlength()[@property] length Size in bytes of the buffer allocationMDLMeshBufferMapmap()map CPU access to buffer's memory The buffer will remain mapped as long as the returned MDLMeshBufferMap object exists.longtype()[@property] type the intended type of the bufferMDLMeshBufferZonezone()[@property] 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).-
Methods inherited from interface apple.foundation.protocol.NSCopying
copyWithZone
-
-
-
-
Method Detail
-
allocator
MDLMeshBufferAllocator allocator()
[@property] 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)
-
fillDataOffset
void fillDataOffset(NSData data, long offset)
fillData:offset: Fills buffer with data at offset Fills data.length bytes of data. Will not write beyond length of this buffer.- Parameters:
data- Data to fill buffer withoffset- Byte offset in buffer to begin filling data
-
length
long length()
[@property] length Size in bytes of the buffer allocation
-
map
MDLMeshBufferMap map()
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.- Returns:
- An MDLMeshBufferMap object to read or modify a buffer's memory
-
type
long type()
[@property] type the intended type of the buffer
-
zone
MDLMeshBufferZone zone()
[@property] 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.
-
-