bufferData method

void bufferData(
  1. int target,
  2. dynamic data,
  3. int? usage
)

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');
}