glDebugMessageInsertArb function opengl_glext

void glDebugMessageInsertArb(
  1. int source,
  2. int type,
  3. int id,
  4. int severity,
  5. int length,
  6. String buf,
)
GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)

Implementation

void glDebugMessageInsertArb(
  int source,
  int type,
  int id,
  int severity,
  int length,
  String buf,
) {
  final glDebugMessageInsertArbAsFunction = _glDebugMessageInsertArb
      .cast<
        NativeFunction<
          Void Function(
            Uint32 source,
            Uint32 type,
            Uint32 id,
            Uint32 severity,
            Uint32 length,
            Pointer<Utf8> buf,
          )
        >
      >()
      .asFunction<
        void Function(
          int source,
          int type,
          int id,
          int severity,
          int length,
          Pointer<Utf8> buf,
        )
      >();
  final bufPointer = buf.toNativeUtf8();
  final result = glDebugMessageInsertArbAsFunction(
    source,
    type,
    id,
    severity,
    length,
    bufPointer,
  );
  calloc.free(bufPointer);
  return result;
}