glObjectPtrLabel function opengl_glext

void glObjectPtrLabel(
  1. Pointer<Void> ptr,
  2. int length,
  3. String label
)
GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label)

Implementation

void glObjectPtrLabel(Pointer<Void> ptr, int length, String label) {
  final glObjectPtrLabelAsFunction = _glObjectPtrLabel
      .cast<
        NativeFunction<
          Void Function(Pointer<Void> ptr, Int32 length, Pointer<Utf8> label)
        >
      >()
      .asFunction<
        void Function(Pointer<Void> ptr, int length, Pointer<Utf8> label)
      >();
  final labelPointer = label.toNativeUtf8();
  final result = glObjectPtrLabelAsFunction(ptr, length, labelPointer);
  calloc.free(labelPointer);
  return result;
}