eglGetConfigAttrib function
Implementation
int eglGetConfigAttrib(
Pointer<Void> display, Pointer<Void> config, EglConfigAttribute attribute) {
final value = calloc<Int32>();
final nativeCallSucceeded = _libEGL!.eglGetConfigAttrib(
display,
config,
attribute.toIntValue(),
value.cast(),
) ==
1;
int result = -1;
if (nativeCallSucceeded) {
result = value.value;
}
calloc.free(value);
if (!nativeCallSucceeded) {
throw EglException(
'Failed to get configs attribute for display [$display], attribute: ${attribute.toString()}.');
}
return result;
}