glCreateShaderProgramExt function opengl_glext

int glCreateShaderProgramExt(
  1. int type,
  2. String string
)
GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string)

Implementation

int glCreateShaderProgramExt(int type, String string) {
  final glCreateShaderProgramExtAsFunction = _glCreateShaderProgramExt
      .cast<
        NativeFunction<Uint32 Function(Uint32 type, Pointer<Utf8> string)>
      >()
      .asFunction<int Function(int type, Pointer<Utf8> string)>();
  final stringPointer = string.toNativeUtf8();
  final result = glCreateShaderProgramExtAsFunction(type, stringPointer);
  calloc.free(stringPointer);
  return result;
}