shaderSource method

void shaderSource(
  1. WebGLShader shader,
  2. String shaderSource
)

Implementation

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