public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options, new VoidBlock2<Long, Long>() { @Override public void invoke(Long a, Long b) { byte[] bytes = VM.newByteArray(a, b.intValue()); deallocator.invoke(bytes); } }); } public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, MTLPipelineOption options) throws NSErrorException {
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options); } public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) {
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options, new VoidBlock2<Long, Long>() { @Override public void invoke(Long a, Long b) { byte[] bytes = VM.newByteArray(a, b.intValue()); deallocator.invoke(bytes); } }); } public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, MTLPipelineOption options) throws NSErrorException {
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options, new VoidBlock2<Long, Long>() { @Override public void invoke(Long a, Long b) { byte[] bytes = VM.newByteArray(a, b.intValue()); deallocator.invoke(bytes); } }); } public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, MTLPipelineOption options) throws NSErrorException {
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options); } public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) {
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options); } public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) {