glCreateShaderProgramExt function

int glCreateShaderProgramExt(
  1. int type,
  2. String string
)
define glCreateShaderProgramEXT GLEW_GET_FUN(__glewCreateShaderProgramEXT)
GLEW_FUN_EXPORT PFNGLCREATESHADERPROGRAMEXTPROC __glewCreateShaderProgramEXT
typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROGRAMEXTPROC) (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;
}