import type { _MDLMeshBufferData } from "./MDLMeshBufferData.js";
import type { _MDLMeshBufferZone } from "./MDLMeshBufferZone.js";
import type { _MDLMeshBufferZoneDefault } from "./MDLMeshBufferZoneDefault.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _GLKMeshBuffer } from "../GLKit/GLKMeshBuffer.js";
import type { _MTKMeshBuffer } from "../MetalKit/MTKMeshBuffer.js";
import type { MDLMeshBufferType } from "./MDLMeshBufferType.js";
export interface _MDLMeshBufferAllocator {
    /**
     * @method newZone: @abstract Create a zone which can be used to allocate MDLMeshBuffer objects @param capacity Total size in bytes of all buffers which can be created from this zone
     */
    newZone$?(capacity: number): _MDLMeshBufferZoneDefault;
    /**
     * @method newZoneForBuffersWithSize:andType: @abstract Create a zone which can be used to allocate MDLMeshBuffer objects @param sizes Sizes of each buffer to be created in this zone @param types Type of each buffer to be created in this zone. Values to be of MDLMeshBufferType @discussion Will create a zone from which MDLMeshBuffer objects can be allocated. This will allocate a zone with enough capacity for each of the buffers with sizes and types specified even taking into any alignment restrictions necessary to use these buffers.
     */
    newZoneForBuffersWithSize$andType$?(sizes: _NSArray, types: _NSArray): _MDLMeshBufferZoneDefault;
    /**
     * @method newBuffer:type: @abstract Create a buffer in a default zone @param length Size of buffer to be created in bytes @param type Type of data to be stored in this buffer
     */
    newBuffer$type$?(length: number, type: MDLMeshBufferType): _GLKMeshBuffer | _MDLMeshBufferData | _MTKMeshBuffer;
    /**
     * @method newBufferWithData:type: @abstract Create a buffer in a default zone and fill with data in the supplied NSData object @param data Memory to fill the buffer with @param type Type of data to be stored in this buffer
     */
    newBufferWithData$type$?(data: _NSData, type: MDLMeshBufferType): _GLKMeshBuffer | _MDLMeshBufferData | _MTKMeshBuffer;
    /**
     * @method newBufferFromZone:length:type: @abstract Create a buffer from a given zone with the given length @return An object conforming to the MDLMeshBuffer protocol. Returns nil the buffer could not be allocated in the zone given. @param zone Zone from which to allocate the memory @param type Type of data to be stored in this buffer @discussion An implementing MDLMeshBufferAllocator object may increase the size of the zone if the buffer could not be allocated with the current zone size. Alternatively the implementation may return nil if the buffer could not be allocated.
     */
    newBufferFromZone$length$type$?(zone: _MDLMeshBufferZone | null, length: number, type: MDLMeshBufferType): _GLKMeshBuffer | _MDLMeshBufferData | _MTKMeshBuffer | null;
    /**
     * @method newBufferFromZone:data:type: @abstract Create a buffer from a given zone and fill with data in the supplied NSData object @return An object conforming to the MDLMeshBuffer protocol. Returns nil the buffer could not be allocated in the given zone @param zone Zone from which to allocate the memory @param data Values with which to fill the buffer @param type Type of data to be stored in this buffer @discussion An implementing MDLMeshBufferAllocator object may increase the size of the zone if the buffer could not be allocated with the current zone size. Alternatively the implementation may return nil if the buffer could not be allocated.
     */
    newBufferFromZone$data$type$?(zone: _MDLMeshBufferZone | null, data: _NSData, type: MDLMeshBufferType): _GLKMeshBuffer | _MDLMeshBufferData | _MTKMeshBuffer | null;
}
