eglInitialize function
Implementation
EglInitializeResult eglInitialize(Pointer<Void> display) {
final major = calloc<Int32>();
final minor = calloc<Int32>();
final nativeCallSucceeded =
_libEGL!.eglInitialize(display, major, minor) == 1;
EglInitializeResult result;
if (nativeCallSucceeded) {
result = EglInitializeResult(
majorVersion: major.value,
minorVersion: minor.value,
);
} else {
throw EglException('Failed to initialize with display [$display]');
}
calloc.free(major);
calloc.free(minor);
return result;
}