Home

EGLBoolean

EGLBoolean is a typedef used in the Khronos EGL API to represent boolean results. It is defined in the EGL headers as an unsigned int type and is used as the return type for many EGL functions. The macros EGL_FALSE and EGL_TRUE define the two possible values: EGL_FALSE is 0 and EGL_TRUE is 1. In practice, a zero value is treated as false, while a non-zero value is treated as true.

Functions in the EGL API commonly return EGLBoolean to indicate success or failure. Examples include eglInitialize,

EGLBoolean exists to maintain portability and ABI compatibility across platforms and languages that interact with EGL,

See also: EGL API, Khronos Group, EGLBoolean usage in function prototypes, and the EGL_TRUE/EGL_FALSE macros.

eglTerminate,
eglBindAPI,
and
eglChooseConfig,
all
of
which
return
EGLBoolean
to
signal
whether
the
operation
succeeded.
The
actual
boolean
value
is
typically
checked
against
EGL_TRUE
(equal
to
1)
or
EGL_FALSE
(equal
to
0),
though
any
non-zero
value
will
be
treated
as
true
by
standard
C
boolean
semantics.
including
environments
that
do
not
support
the
C99
bool
type.
By
using
an
unsigned
int
for
booleans
and
explicit
EGL_TRUE/EGL_FALSE
macros,
the
API
avoids
potential
inconsistencies
in
size
or
representation
of
boolean
values
among
different
compilers
and
architectures.