shaderSource method

void shaderSource(
  1. dynamic v0,
  2. String shaderSource
)

Implementation

void shaderSource(v0, String shaderSource) {
  var sourceString = shaderSource.toNativeUtf8();
  var arrayPointer = calloc<Pointer<Int8>>();
  arrayPointer.value = Pointer.fromAddress(sourceString.address);
  gl.glShaderSource(v0, 1, arrayPointer, nullptr);
  calloc.free(arrayPointer);
  calloc.free(sourceString);
}