shaderSource method
Replaces the source code in a shader object
shaderSpecifies the handle of the shader object whose source code is to be replaced.shaderSourceSpecifies an array of pointers to strings containing the source code to be loaded into the shader.
Implementation
void shaderSource(int shader, String shaderSource) {
var sourceString = shaderSource.toNativeUtf8();
var arrayPointer = calloc<Pointer<Int8>>();
arrayPointer.value = Pointer.fromAddress(sourceString.address);
gl.glShaderSource(shader, 1, arrayPointer, nullptr);
calloc.free(arrayPointer);
calloc.free(sourceString);
}