forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
21
Kha/Backends/Kinc-HL/kha/arrays/ByteBuffer.hx
Normal file
21
Kha/Backends/Kinc-HL/kha/arrays/ByteBuffer.hx
Normal file
@ -0,0 +1,21 @@
|
||||
package kha.arrays;
|
||||
|
||||
abstract ByteBuffer(Pointer) from Pointer to Pointer {
|
||||
function new(bytearray: Pointer) {
|
||||
this = bytearray;
|
||||
}
|
||||
|
||||
public static function create(length: Int): ByteBuffer {
|
||||
return new ByteBuffer(kinc_bytebuffer_alloc(length));
|
||||
}
|
||||
|
||||
public function free() {
|
||||
kinc_bytebuffer_free(this);
|
||||
}
|
||||
|
||||
@:hlNative("std", "kinc_bytebuffer_alloc") static function kinc_bytebuffer_alloc(elements: Int): Pointer {
|
||||
return null;
|
||||
}
|
||||
|
||||
@:hlNative("std", "kinc_bytebuffer_free") static function kinc_bytebuffer_free(bytearray: Pointer) {}
|
||||
}
|
Reference in New Issue
Block a user