getUniformLocation method

int getUniformLocation(
  1. int program,
  2. String name
)

Returns the location of a uniform variable

  • program Specifies the program object to be queried.
  • name Points to a null terminated string containing the name of the uniform variable whose location is to be queried.

Implementation

int getUniformLocation(int program, String name) {
  final locationName = name.toNativeUtf8();
  final location = gl.glGetUniformLocation(program, locationName.cast<Int8>());
  calloc.free(locationName);
  return location;
}