bufferData method
Be careful which type of integer you really pass here. Unfortunately an UInt16List
is viewed by the Dart type system just as List of int, so we jave to specify the native type
here in nativeType
Implementation
void bufferData(int target, dynamic data, int? usage) {
startCheck("bufferData");
if(data is int){
glBufferDatai(_gl, target, data, usage ?? 0);
}
else{
glBufferData(_gl, target, (data as TypedData).jsify(), usage ?? 0);
}
checkError('bufferData');
}